CEMon CLI User guide
1 Introduction
The CEMon CLI is provided by the
glite-ce-monitor-client-api-c
package, which is installed by default on a EMI-UI.
It provides the following executables:
-
/usr/bin/glite-ce-monitor-getinfo
-
/usr/bin/glite-ce-monitor-gettopics
-
/usr/bin/glite-ce-monitor-getevent
-
/usr/bin/glite-ce-monitor-subscribe
-
/usr/bin/glite-ce-monitor-subinfo
-
/usr/bin/glite-ce-monitor-subupdate
-
/usr/bin/glite-ce-monitor-pause
-
/usr/bin/glite-ce-monitor-resume
-
/usr/bin/glite-ce-monitor-unsubscribe
-
/usr/bin/glite-ce-monitor-consumer
whose use is explained in the following sections.
2 Query the CEMon service
2.1 Get general information about CEMon
glite-ce-monitor-getinfo
is the tool to be used to have general information about a CEMon installation.
Usage:
glite-ce-monitor-getinfo [--cert <CERTIFICATE_FILE] [--key <KEY_FILE>] <CEMon_URL>
If the
--cert
option is not specified, the file referred by the environment variable
X509_USER_CERT
is considered. If this variable is not set, the the file referred by the environment variable
X509_USER_PROXY
is considered. If even this variable is not set, the file
/tmp/x509_u<uid>
is considered
If the
--key
option is not specified, the file referred by the environment variable
X509_USER_KEY
is considered. If this variable is not set, the the file referred by the environment variable
X509_USER_PROXY
is considered. If even this variable is not set, the file
/tmp/x509_u<uid>
is considered
CEMon_URL
is the URL of the CEMon service
Example:
$ glite-ce-monitor-getinfo --cert /tmp/x509up_u756 --key /tmp/x509up_u756 https://cream-35.pd.infn.it:8443/ce-monitor/services/CEMonitor
Description=[cemonitor service]
Version =[1.0]
HostDN =[/C=IT/O=INFN/OU=Host/L=Padova/CN=cream-35.pd.infn.it]
Action [SendExpiredNotification::]
Action [DoNotSendNotification::]
Action [SendNotification::]
2.2 Get information about deployed CEMon sensors
glite-ce-monitor-gettopics
is the tool to be used to have general information about installed CEMon sensors. For each installed sensor it provides:
- the topic name
- the available dialects, along with the query languages that can be used for that dialect
Usage:
glite-ce-monitor-gettopics [--cert <CERTIFICATE_FILE] [--key <KEY_FILE>] <CEMon_URL>
If the
--cert
option is not specified, the file referred by the environment variable
X509_USER_CERT
is considered. If this variable is not set, the the file referred by the environment variable
X509_USER_PROXY
is considered. If even this variable is not set, the file
/tmp/x509_u<uid>
is considered
If the
--key
option is not specified, the file referred by the environment variable
X509_USER_KEY
is considered. If this variable is not set, the the file referred by the environment variable
X509_USER_PROXY
is considered. If even this variable is not set, the file
/tmp/x509_u<uid>
is considered
CEMon_URL
is the URL of the CEMon service
Example:
$ glite-ce-monitor-gettopics --cert /tmp/x509up_u756 --key /tmp/x509up_u756 https://cream-35.pd.infn.it:8443/ce-monitor/services/CEMonitor
Topic [CE_MONITOR]
Dialect [ISM_CLASSAD_GLUE_1.2]
queryLanguage [RegEx]
queryLanguage [ClassAd]
Dialect [ISM_CLASSAD]
queryLanguage [RegEx]
queryLanguage [ClassAd]
Dialect [ISM_LDIF_GLUE_1.2]
queryLanguage [RegEx]
queryLanguage [ClassAd]
Dialect [ISM_LDIF]
queryLanguage [RegEx]
queryLanguage [ClassAd]
Topic [CREAM_JOBS]
Dialect [CLASSAD]
queryLanguage [ClassAd]
2.3 Get information provided by a CEMon sensor
glite-ce-monitor-getevent
is the tool to be used to get the last output produced by a specific CEMon sensor
Usage:
glite-ce-monitor-getevent --topic <TOPIC_NAME> [--dialect <DIALECT_NAME>] [--cert <CERTIFICATE_FILE>] [--key <KEY_FILE>] <CEMon_URL
TOPIC_NAME
is the name of the topic (sensor) for which the event is requested
=DIALECT_NAME is the name of the dialect (which defines how the information should be rendered).
==If the --dialect option is not specified the default dialect for that sensor is considered
If the
--cert
option is not specified, the file referred by the environment variable
X509_USER_CERT
is considered. If this variable is not set, the the file referred by the environment variable
X509_USER_PROXY
is considered. If even this variable is not set, the file
/tmp/x509_u<uid>
is considered
If the
--key
option is not specified, the file referred by the environment variable
X509_USER_KEY
is considered. If this variable is not set, the the file referred by the environment variable
X509_USER_PROXY
is considered. If even this variable is not set, the file
/tmp/x509_u<uid>
is considered
CEMon_URL
is the URL of the CEMon service
Example:
$ glite-ce-monitor-getevent --topic CE_MONITOR --dialect ISM_LDIF --cert /tmp/x509up_u756 --key /tmp/x509up_u756 https://cream-35.pd.infn.it:8443/ce-monitor/services/CEMonitor | more
Event[0]:
Message[0]=[[
gluecestatefreejobslots = 0;
glueceinfolrmstype = "lsf";
gluecestatetotaljobs = 0;
gluecepolicymaxtotaljobs = 999999999;
glueceinfocontactstring = "https://cream-35.pd.infn.it:8443/ce-cream/services";
gluecepolicypreemption = 0;
glueforeignkey = {
"GlueClusterUniqueID=cream-35.pd.infn.it"
};
gluecestaterunningjobs = 0;
gluecestateestimatedresponsetime = 777777;
gluecepolicymaxobtainablewallclocktime = 999999999;
glueinformationserviceurl = "ldap://cream-35.pd.infn.it:2170/mds-vo-name=resourc";
glueceinfodatadir = "unset";
gluecehostingcluster = "cream-35.pd.infn.it";
gluecepolicymaxwaitingjobs = 999999999;
gluecestateworstresponsetime = 1555554;
glueceinfoapplicationdir = "/opt/exp_soft/alice";
glueceuniqueid = "cream-35.pd.infn.it:8443/cream-lsf-creamtest2";
glueceimplementationversion = 31;
gluececapability = "unset";
...
...
3 Work with CEMon subscriptions
3.1 Create a subscription
glite-ce-monitor-subscribe
is the tool to be used to create a CEMon subscription. The events produced by the relevant CEMon sensor will be specified to the specified CEMon consumer.
Usage:
glite-ce-monitor-subscribe [--cert <CERTIFICATE_FILE>] [--key <KEY_FILE>] --topic <TOPIC_NAME> [--dialects <COLON-SEPARATED_DIALECT_LIST>] --consumer-url <CONSUMER_URL_TO_SUBSCRIBE> [--rate <DELAY_BETWEEN_TWO_NOTIFICATIONS>] [--duration <DURATION_OF_SUBSCRIPTION>] <CEMon_URL>
If the
--cert
option is not specified, the file referred by the environment variable
X509_USER_CERT
is considered. If this variable is not set, the the file referred by the environment variable
X509_USER_PROXY
is considered. If even this variable is not set, the file
/tmp/x509_u<uid>
is considered
If the
--key
option is not specified, the file referred by the environment variable
X509_USER_KEY
is considered. If this variable is not set, the the file referred by the environment variable
X509_USER_PROXY
is considered. If even this variable is not set, the file
/tmp/x509_u<uid>
is considered
TOPIC_NAME
is the name of the topic (sensor) for which the event is requested
If the
--dialects
option is not specified the default dialect for that sensor is considered
CONSUMER_URL_TO_SUBSCRIBE
is the URL of the CEMon consumer where the information produced by the relevant CEMon sensor must be sent
Notifications for the specified topic will be sent to the consumer every
DELAY_BETWEEN_TWO_NOTIFICATIONS
seconds
CEMon_URL
is the URL of the CEMon service
Examples:
$ glite-ce-monitor-subscribe --topic CE_MONITOR --dialects ISM_LDIF --cert /tmp/x509up_u756 --key /tmp/x509up_u756 --consumer-url http://lxsgaravatto.pd.infn.it:5676 https://cream-35.pd.infn.it:8443/ce-monitor/services/CEMonitor
SubscriptionID=[uuid-1247573738304]
$ glite-ce-monitor-subscribe --topic CE_MONITOR --dialects ISM_LDIF --cert /tmp/x509up_u756 --key /tmp/x509up_u756 --consumer-url https://lxsgaravatto.pd.infn.it:5677 https://cream-35.pd.infn.it:8443/ce-monitor/services/CEMonitor
SubscriptionID=[uuid-1247573798410]
3.2 List existing subscriptions
The
glite-ce-monitor-subinfo
command can be used to list the existing subscriptions (belonging to the user issuing the command) on a specific CEMon installation.
Usage:
glite-ce-monitor-subinfo [--cert <CERTIFICATE_FILE] [--key <KEY_FILE>] <CEMon_URL>
If the
--cert
option is not specified, the file referred by the environment variable
X509_USER_CERT
is considered. If this variable is not set, the the file referred by the environment variable
X509_USER_PROXY
is considered. If even this variable is not set, the file
/tmp/x509_u<uid>
is considered
If the
--key
option is not specified, the file referred by the environment variable
X509_USER_KEY
is considered. If this variable is not set, the the file referred by the environment variable
X509_USER_PROXY
is considered. If even this variable is not set, the file
/tmp/x509_u<uid>
is considered
CEMon_URL
is the URL of the CEMon service
Example:
$ glite-ce-monitor-subinfo --cert /tmp/x509up_u756 --key /tmp/x509up_u756 https://cream-35.pd.infn.it:8443/ce-monitor/services/CEMonitor
ID=[uuid-1247573798410] Topic=[CE_MONITOR] Consumer=[https://lxsgaravatto.pd.infn.it:5677] Rate=[20] Expiration=Wed Apr 20 14:26:38 2011
ID=[uuid-1247573738304] Topic=[CE_MONITOR] Consumer=[http://lxsgaravatto.pd.infn.it:5676] Rate=[20] Expiration=Wed Apr 20 14:25:38 2011
3.3 Modify a CEMon subscription
glite-ce-monitor-subupdate
is the command that must be used to modify an existing CEMon subscription.
Usage:
glite-ce-monitor-subupdate --id <SUBSCRIPTION_ID_TO_UPDATE> [--cert <CERTIFICATE_FILE>] [--key <KEY_FILE>] --topic <TOPIC_NAME> --dialects <COLON-SEPARATED_DIALECT_LIST> --consumer-url <CONSUMER_URL_TO_SUBSCRIBE> [--rate <DELAY_BETWEEN_TWO_NOTIFICATIONS>] [--duration <DURATION_OF_SUBSCRIPTION>] <CEMon_URL>
SUBSCRIPTION_ID_TO_UPDATE
is the identifier of the CEMon subscription that must be updated
If the
--cert
option is not specified, the file referred by the environment variable
X509_USER_CERT
is considered. If this variable is not set, the the file referred by the environment variable
X509_USER_PROXY
is considered. If even this variable is not set, the file
/tmp/x509_u<uid>
is considered
If the
--key
option is not specified, the file referred by the environment variable
X509_USER_KEY
is considered. If this variable is not set, the the file referred by the environment variable
X509_USER_PROXY
is considered. If even this variable is not set, the file
/tmp/x509_u<uid>
is considered
CONSUMER_URL_TO_SUBSCRIBE
is the URL of the new CEMon consumer where the information produced by the relevant CEMon sensor must be sent
Notifications for the specified topic will be sent to the consumer every
DELAY_BETWEEN_TWO_NOTIFICATIONS
seconds
CEMon_URL
is the URL of the CEMon service
Example:
$ glite-ce-monitor-subupdate --id uuid-1247573738304 --cert /tmp/x509up_u756 --key /tmp/x509up_u756 --consumer-url http://lxsgaravatto.pd.infn.it:8676 --topic CE_MONITOR --dialects ISM_LDIF https://cream-35.pd.infn.it:8443/ce-monitor/services/CEMonitor
3.4 Suspend a notification
glite-ce-monitor-pause
is the command to be used to suspend a notification. When a notification is suspended. CEMon doesn't send any event to the relevant CEMon consumer.
Usage:
glite-ce-monitor-pause [--cert <CERTIFICATE_FILE] [--key <KEY_FILE>] --id <SUBSCRIPTION_ID_TO_PAUSE> <CEMon_URL>
SUBSCRIPTION_ID_TO_PAUSE
is the identifier of the CEMon subscription that must be suspended
If the
--cert
option is not specified, the file referred by the environment variable
X509_USER_CERT
is considered. If this variable is not set, the the file referred by the environment variable
X509_USER_PROXY
is considered. If even this variable is not set, the file
/tmp/x509_u<uid>
is considered
If the
--key
option is not specified, the file referred by the environment variable
X509_USER_KEY
is considered. If this variable is not set, the the file referred by the environment variable
X509_USER_PROXY
is considered. If even this variable is not set, the file
/tmp/x509_u<uid>
is considered
CEMon_URL
is the URL of the CEMon service
3.5 Resume a notification
glite-ce-monitor-resume
is the command to be used to resume a previously suspended notification.
Usage:
glite-ce-monitor-resume [--cert <CERTIFICATE_FILE] [--key <KEY_FILE>] --id <SUBSCRIPTION_ID_TO_RESUME> <CEMon_URL>
<verbatim>
=SUBSCRIPTION_ID_TO_RESUME= is the identifier of the CEMon subscription that must be resumed
If the =--cert= option is not specified, the file referred by the environment variable =X509_USER_CERT= is considered. If this variable is not set, the the file referred by the environment variable =X509_USER_PROXY= is considered. If even this variable is not set, the file =/tmp/x509_u<uid>= is considered
If the =--key= option is not specified, the file referred by the environment variable =X509_USER_KEY= is considered. If this variable is not set, the the file referred by the environment variable =X509_USER_PROXY= is considered. If even this variable is not set, the file =/tmp/x509_u<uid>= is considered
=CEMon_URL= is the URL of the CEMon service
---## Delete a subscription
=glite-ce-monitor-unsubscribe= is the command that must be used to remove an existing CEMon subscription.
Usage:
<verbatim>
glite-ce-monitor-unsubscribe [--cert <CERTIFICATE_FILE>] [--key <KEY_FILE>] --id <SUBSCRIPTION_ID_TO_REMOVE> <CEMon_URL>
</verbatim>
=SUBSCRIPTION_ID_TO_REMOVE= is the identifier of the CEMon subscription that must be removed
If the =--cert= option is not specified, the file referred by the environment variable =X509_USER_CERT= is considered. If this variable is not set, the the file referred by the environment variable =X509_USER_PROXY= is considered. If even this variable is not set, the file =/tmp/x509_u<uid>= is considered
If the =--key= option is not specified, the file referred by the environment variable =X509_USER_KEY= is considered. If this variable is not set, the the file referred by the environment variable =X509_USER_PROXY= is considered. If even this variable is not set, the file =/tmp/x509_u<uid>= is considered
=CEMon_URL= is the URL of the CEMon service
---## Start a CEMon consumer
=glite-ce-monitor-consumer= is a command to be used to start a CEMon consumer. It starts a light stand-alone web service that accepts notifications from a CEMon service and parses their SOAP messages (events).
Usage:
<verbatim>
glite-ce-monitor-consumer [--key keyfile --cert certfile] [--outpath path] [--append-output] <tcpport>
</verbatim>
The content of the received notification is printed in a file whose name is the hostname of the CEMon host and which is created in the directory specified with the option =--outpath=. This file is overwritten for every received notification, unless the =--append-output= is specified.
The cert and key file must be specified only if the authentication must be turned on. Please note that this works with host cert and key files, while it doesn't work with user proxies
Examples:
<verbatim>
$ glite-ce-monitor-consumer --outpath /home/sgaravat --append-output 8676
$ glite-ce-monitor-consumer --cert /home/sgaravat/hostcert.pem --key /home/sgaravat/hostkey.pem 5677
</verbatim>
---
-- Main.MassimoSgaravatto - 2011-04-20</verbatim>
<nop>