Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > E

evweb_subscribe(1)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

evweb_subscribe — enables you to view, create, modify, and delete event subscriptions

SYNOPSIS

evweb subscribe

  • {-L [ -b|-h ] }

  • {-E [ -h|-n ] }

  • {-C [ -e|-h|-i|-n|-r|-t|-v ] }

  • {-M [ -e|-h|-i|-n|-r|-t|-v }

  • {-D [ -f|-n ] }

DESCRIPTION

The evweb subscribe command enables you to create (-C), delete (-D), modify (-M), list (-L), and view detailed information (-E) about subscriptions.

The options -L, -E, -C, -M, and -D are mutually exclusive. They can be used with other switches such as -b, -e, -f, -h, -i, -n, and -v.

Options

The evweb subscribe command supports the following options:

-b[internal|external]

Specifies whether the list of categories must display internal or external subscriptions. Subscriptions created by tools other than evweb are referred to as external subscriptions. The default value is internal. Following are the examples of the -b option:

  • -b external

-C

Creates a new subscription. The following switches can be used along with this option:

  • -n subscription_name

  • -e [eq|ne|le|ge|bw]:severity_level1[,severity_level2]

  • -v [event_category]

  • -i Event_ID

  • -t [archive|syslog|email][handler_properties]

  • -r

  • -h

The -n switch is mandatory. Following are the examples of the -C option:

  • evweb subscribe -C -n my_subs_2 -i 1234

  • evweb subscribe -C -h

-D

Deletes a subscription. Use the following switches with this option:

  • -n subscription_name

  • -f

The -n switch is mandatory. Following are the examples of the -D option:

  • evweb subscribe -D -n my_subs_1

  • evweb subscribe -D -h

-e [eq|ne|le|ge|bw]:severity_level1[,severity_level2]

Specifies severity as a part of the subscription criteria. Severity is represented by an operator followed by the severity values. The following operators can be used:

eq

equal to (default)

ne

not equal to

le

less than or equal to

ge

greater than or equal to

bw

between

The default value of operator is eq. You must use only one operator at a time. To use the bw operator, you must specify the lower and upper severity levels. For all other operators, you must specify only one severity level.

The severity level ranges from 0 to 7, where 0 is least severe and 7 is most severe. Following lists the severity levels in ascending order of severity:

0

Unknown

1

Normal

2

Other

3

Information

4

Warning

5

Minor

6

Major

7

Critical

Use a colon (:) to separate an operator and a severity level. Use a comma (,) to separate two severity levels. You can also use a space to separate an operator and a severity level. However, in this case, you should enclose the operator and severity values within double quotes. You can specify only one -e switch in a command. Following are the examples of the -e option:

  • -e ne:2

  • -e bw:2,5

  • -e "bw 2,5"

  • -e eq:4

  • -e "eq 4"

  • -e 4

-E

Lists details of an event subscription. Use -n subscription_name with this option. The -n switch is mandatory. Following are the examples of the -E option:

  • evweb subscribe -E -n my_subscription_1

  • evweb subscribe -E -h

-f

Forces the command without asking for a confirmation. You can use this switch only with the -D option. Following are the examples of the -f option:

  • evweb subscribe -D -n my_subs_1 -f

-h

Displays how to use the evweb subscribe [-L|-E|-C|-M|-D] command. Following are the examples of the -h option:

  • evweb subscribe -h

-i Event_ID

Specifies an EventID. Use this option as a part of the subscription criteria. You cannot use this switch more than once in a command. Following are the examples of the -i option:

  • -i 10608

-L

Lists a summary of event subscriptions. Use -b[internal|external] with this option. Following are the examples of the -L option:

  • evweb subscribe -L -b

  • evweb subscribe -L -b internal

  • evweb subscribe -L -b external

  • evweb subscribe -L -h

-M

Modifies a subscription. The following switches can be used along with this option:

  • -n subscription_name

  • -e [eq|ne|le|ge|bw]:severity_level1[,severity_level2]

  • -v [event_category]

  • -i Event_ID

  • -t [archive|syslog|email][handler_properties]

  • -r

  • -h

The -n switch is mandatory.

  • If the destinations are not specified with this option, then the behavior depends on the usage of -r option. For more information, see the description of the -r option.

  • If both the subscription criteria and the destination are specified, both of them are updated.

  • If the destination is specified but not the subscription criteria, the destination is updated and the original subscription criteria are retained.

Following are the examples of the -M option:

  • evweb subscribe -M -n my_subs_2 -i 1235

  • evweb subscribe -M -n 2my_subs_2 -i 1235 -r

  • evweb subscribe -M -n my_subs_3 -t archive

  • evweb subscribe -M -h

-n subscription_name

Specifies the name of the subscription. The subscription name must be unique. Following are the examples of the -n option:

  • -n MySubs

-r

Specifies whether the destination should be modified. This is true only if the subscription criteria are specified as a part of the subscription modification request. Use this option only with the evweb subscribe -M option.

For evweb subscribe -M, if you specify only the subscription criteria and not the destination, then:

  • If you specify the -r option, remove the current destination and update the subscription criteria as specified.

  • If you do not specify the -r option, retain the current destination and update the subscription criteria as specified.

Following are the examples of the -r option:

  • evweb subscribe -M -n my_subs_2 -i 1235 -r

-t [archive|syslog|email][handler_properties]

Specifies one or more subscription destinations. You can use the -t switch to specify one of the following three destinations:

archive

Indicates that events are stored in the Event Archive. No additional property is required. The location of Event Archive is /var/opt/sfmdb/pgsql.

syslog

Indicates that events are stored in syslog. No additional property is required. The location of syslog is /var/adm/syslog/syslog.log.

email

Indicates that events are mailed to the specified e-mail address. You can specify multiple e-mail addresses. Use a semi colon (;) to separate multiple e-mail addresses in the to or cc field. Use a colon (:) to separate keywords in the to and cc field, or enclose the complete e-mail string in double quotes. The use of to keyword is mandatory. However, the use of the cc keyword is optional.

You can specify only one destination with the -t switch at a time. To specify multiple destinations, use the -t switch multiple times. Following are the examples of the -t option:

  • -t archive

  • -t syslog

  • -t email:to:abc@xyz.com

  • -t email:to:abc@xyz.com;efg@xyz.com

  • -t email:to:abc@xyz.com;efg@xyz.com:cc:hij@xyz.com

  • -t archive

    -t "email to: abc@xyz.com cc:efg@xyz.com;hij@xyz.com"

    -t "email to:nop@xyz.com" -t syslog

-v [event_category]

Specifies an event category as a part of the subscription criteria. Use the evweb list -v command to view the possible values for this option. The event category strings are case-sensitive. Following are the examples of the -v option:

  • -v Processor

EXAMPLES

evweb subscribe -L

  • Lists all subscriptions that are created using EVWEB.

evweb subscribe -L -b external

  • Lists all subscriptions that are created using tools other than EVWEB.

evweb subscribe -E -n MySubs

  • Displays details of the subscription named MySubs.

evweb subscribe -C -n MySubs -i Evt002

  • Creates a subscription named MySubs. The subscription criteria is EventId=Evt002. Destination is not selected.

evweb subscribe -C -n MySubs -e 3 -t archive

  • Creates a subscription named MySubs. The subscription criteria is severity=3 and destination=archive.

evweb subscribe -C -n MySubs -t syslog \ -t "email to:admins@hp.com:cc:test@hp.com"

  • Creates a subscription named MySubs. The destination is syslog and email. The e-mail addresses are admins@hp.com (in the To field) and test@hp.com (in the CC field).

evweb subscribe -C -n MySubs \ -t "email to:admins@hp.com:cc:mgrs@hp.com" \ -t "email to:test@hp.com"

  • Creates a subscription named MySubs. The subscription criteria are not specified. However, multiple e-mail destination IDs are specified.

evweb subscribe -M -n MySubs -i Evt001 -t archive -t syslog

  • Modifies the subscription, MySubs, and changes the subscription criteria to EventId=Evt001. The destination is modified to archive and syslog.

evweb subscribe -M -n MySubs -e ge:5

  • Modifies the subscription, MySubs, and changes the subscription criteria. The severity is greater than or equal to 5. The destination is not modified.

evweb subscribe -M -n MySubs -e le:5 -r

  • Modifies the subscription, MySubs, and changes the subscription criteria. The severity is less than or equal to 5. The destination is deleted.

evweb subscribe -D -f -n MySubs

  • Deletes the subscription, MySubs, without asking for confirmation.

AUTHOR

evweb subscribe is developed by HP.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.