NAME

pmx-csl - Manage PureMessage Central Server Logs


SYNOPSIS

    pmx-csl list --select="host=host.com" --select="priority=1"
    pmx-csl remove --priority=1
    pmx-csl note --error="My Custom CSL Note" --priority=1


DESCRIPTION

Use the pmx-csl utility to view, manage and raise CSL notes. A CSL note is a fault-tolerant database logging mechanism. If the database is unavailable at the time a CSL note is raised, it is cached locally until it can be flushed to the database.

Commands

help
Displays help.

list
Lists the current CSL notes that have been raised. Restrict the list of CSL notes displayed using the various options below. For example, to display only CSL notes of type INFO, use:
    pmx-csl list --priority=1

Or, to display only CSL notes that originated on host mx1.custom.com, use:

    pmx-csl list --host=mx1.custom.com

The various restriction options can be combined to be as restrictive as desired. For instance, it is valid to use:

    pmx-csl list --host=mx1.custom.com --priority=1

to display on CSL notes of priority INFO that originated on host mx1.custom.com.

pending
Displays the CSL notes cached locally because of database connectivity problems. These notes are flushed automatically by pmx-profile when the database next becomes available, or they can be flushed manually using the flush command.

flush
Attempts to flush locally cached CSL notes to the database. If there is an error connecting to the database, it is displayed for resolution.

remove
Removes all options that match the given restriction options.

note
Raises a CSL note with the specified information. The following options are valid:
    --error        error string of the CSL note
    --cid          csl_id which is a compact description of the error
    --priority     syslog priority level of CSL note
    --ident        identity of the subsystem the CSL note originated from

Options

The following options are recognized:

--host=host
Restricts the display of CSL notes to those that originated at the given hostname.

--location_id=id
Restricts the display of CSL notes to those that originated at the host registered for the given location_id. Hosts register their location using the pmx-profile --init-location command.

--ip=ip
Restricts the display of CSL notes to those that originated from a host that matches the given IP address.

--cid=cid
When executing a list command, this restricts the display of CSL notes to those that have an CSL ID that matches the one given. A CSL ID is a short name that classifies an error. For instance, most database connection errors have an cid of dbh_error. When executing a note command, this option can be passed to classify the error. If not given, the default cid is user_raised.

--priority=priority
An integer that matches the syslog priority levels (shown below). When executing a list command, this restricts display of CSL notes to those that have the given priority. When executing a note, this is taken as the priority of CSL note to raise. If not given, the priority defaults to:
    LOG_EMERG           7
    LOG_ALERT           6
    LOG_CRIT            5
    LOG_ERR             4
    LOG_WARNING         3
    LOG_NOTICE          2
    LOG_INFO            1
    LOG_DEBUG           0

--csl_id=id
Restricts the display of CSL notes to those that match the given CSL ID exactly. Each CSL note is stored in the database with a unique CSL ID. The ID is displayed immediately before the error string in CSL notes viewed with the list command.

--ident=subsystem
When executing a list command, this restricts the display of CSL notes to those that match the given subsystem as identified by its ident. For instance, to view only user-defined CSL notes, use:
    pmx-csl list --ident="pmx-csl"

When raising a CSL note, use this option to set a custom subsystem ident. If none is given, the default ident of pmx-csl is used.

--error=error
The text of the CSL note raised with the note command. This is the actual text logged for the CSL note. For example:
    pmx-csl note --error="Something bad happened"

--select=select string
Allows the display of CSL notes to be restricted to those that match the given string. The string is composed of key/value pairs, where the keys are the option strings defined above. An option can be negated using a ! symbol. For example:
    pmx-csl list --select="priority!=9"


SEE ALSO

the pmx-profile manpage


COPYRIGHT

Copyright (C) 2000-2008 Sophos Group. All rights reserved. Sophos and PureMessage are trademarks of Sophos Plc and Sophos Group.