This section includes examples for using the edgewatch command with SNMP versions 1, 2c, and 3.
Example: Monitor the ypbind Process
The following example creates a Process Monitor table entry at index 16 to monitor the ypbind process running on the target system for SNMPv1:
edgewatch -h 143.45.0.12 -c private -v 1 -o process add procAlive "ypbind" 16 0x00 60 "Monitor ypbind" "/example/pager.sh" “” “” “” minor
The following example creates the same configuration for SNMPv2c:
edgewatch -h 143.45.0.12 -c private -v 2c -o process add procAlive "ypbind" 16 0x00 60 "Monitor ypbind" "/example/pager.sh" “” “” “” fatal
The following example creates the same configuration for SNMPv3:
edgewatch -h 143.45.0.12 -v 3 -u userName -s 3 -a authPassword -A MD5 -x encryptPassword -X DES -o process add procAlive "ypbind" 16 0x00 60 "Monitor ypbind" "/example/pager.sh" “” “” “” major
Indicates the process attribute being monitored. It instructs the agent to monitor the process to make sure it is running. ypbind is the process that the agent is monitoring. It is responsible for client directory lookups and is necessary for computers running Network Information Services (NIS).
Instructs the agent to provide the default behavior for this table entry.
If the process dies, the agent sends a processStop trap and runs the action script /example/pager.sh.
Example: Monitor the firefox Process
The following example creates a Process Monitor table entry at index 20 to monitor the firefox process running on the target computer for SNMPv1:
edgewatch -h 143.45.0.12 -c private -v 1 -o process add procSize "firefox" 20 0x00a02400 60 absolute ">" 35000 "Monitor firefox size" "" “” “” “” critical
The following example creates the same configuration for SNMPv2c:
edgewatch -h 143.45.0.12 -c private -v 2c -o process add procSize "firefox" 20 0x00a02400 60 absolute ">" 35000 "Monitor firefox size" "" “” “” “” none
The following example creates the same configuration for SNMPv3:
edgewatch -h 143.45.0.12 -v 3 -u userName -s 3 -a authPassword -A MD5 -x encryptPassword -X DES -o process add procSize "firefox" 20 0x00a02400 60 absolute ">" 35000 "Monitor firefox size" "" “” “” “” ok
Indicates the process attribute being monitored. It instructs the agent to monitor the overall size of the program's text, data, and stack segments.
Indicates the application that the agent is monitoring.
Instructs the agent to modify the default Process Monitor table behavior as follows:
Instructs the agent to send processClear traps.
Instructs the agent to send up to 10 consecutive traps and then send no more.
Contains the flag value 10 for use with this directive.
Indicates that an event should occur when the process size of netscape exceeds the threshold (35 MB).
Indicates the threshold.
Example: Monitor the Windows TCPSVCS Process
The following example creates a Process Monitor table entry at index 15 to monitor the Windows TCPSVCS process (or service) running on the target system for SNMPv1:
edgewatch -h 143.45.0.12 -c private -v 1 -o process add procAlive "TCPSVCS" 15 0x00 30 "Monitor NT TCP services" "" “” “” “” fatal
The following example creates the same configuration for SNMPv2c:
edgewatch -h 143.45.0.12 -c private -v 2c -o process add procAlive "TCPSVCS" 15 0x00 30 "Monitor NT TCP services" "" “” “” “” ok
The following example creates the same configuration for SNMPv3:
edgewatch -h 143.45.0.12 -v 3 -u userName -s 3 -a authPassword -A MD5 -x encryptPassword -X DES -o process add procAlive "TCPSVCS" 15 0x00 30 "Monitor NT TCP services" "" “” “” “” warning
Indicates the process attribute being monitored. It instructs the agent to scan the Process Monitor table periodically (every 30 seconds) to verify that this process is running.
Indicates the Windows service responsible for TCP-related services on Windows systems.
Instructs the agent to provide the default behavior for this table entry.
Example: Display all of the processes on a system
The following example displays (dumps) all processes on the local host that is running sysedge on port 1691:
edgewatch -c private -p 1691 -v 1 -o process dump
Copyright © 2013 CA. All rights reserved. |
|