Quantcast

monitoring a particual process

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

monitoring a particual process

neelakandan
I am a new to opennms.Could some one please provide me the configuration to monitor a particular process on  a remote linux box using SNMP in opennms. Appreciate any help in this regard.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: monitoring a particual process

kutthroat
Log in to node that is going to be monitored as root user

Ensure the appropriate snmp rpm packages are installed
Navigate to /etc/snmpd
Edit snmpd.conf file
Add the following view to allow the NMS server to see the  processes:
view    systemview      included  .1.3.6.1.2.1.25.4.2.1.4

Restart the snmpd daemon
# service snmpd restart
Log in to OpenNMS server as root
Execute an snmpwalk to see the snmp process table on the effected node.
Example:
# snmpwalk -v2c  -O n -c <snmp_community_name> <TARGET_IP> .1.3.6.1.2.1.25.4.2.1.4  

NOTE:  You can grep for  services, however ensure that they are running on the node being queried.

Create new Package:

Edit poller-configuration.xml
Enter the following information:
<package name="package_name">
        <filter>IPADDR != '0.0.0.0'</filter>
        <include-range begin="<IP_BEGIN_RANGE>" end="<IP_END_RANGE>"/>
        <rrd step="300">
            <rra xmlns="">RRA:AVERAGE:0.5:1:2016</rra>
            <rra xmlns="">RRA:AVERAGE:0.5:12:1488</rra>
            <rra xmlns="">RRA:AVERAGE:0.5:288:366</rra>
            <rra xmlns="">RRA:MAX:0.5:288:366</rra>
            <rra xmlns="">RRA:MIN:0.5:288:366</rra>
        </rrd>
  <downtime begin="0" end="120000" interval="5000"/>
        <downtime begin="120000" end="43200000" interval="120000"/>
        <downtime begin="43200000" end="432000000" interval="600000"/>
        <downtime begin="432000000" delete="true"/>
</package>
Save File
Add Services to  Package
Enter Service name tag before downtime begin tag in the  package created above

<service name=" <_PROCESS>" interval="300000" user-defined="false" status="on">
    <parameter key="retry" value="1"/>
    <parameter key="timeout" value="3000"/>
    <parameter key="service-name" value=" <_PROCESS>"/>
    <parameter key="service-name-oid" value=".1.3.6.1.2.1.25.4.2.1.4"/>
  </service>
Example:
<service name=" _Process " interval="300000" user-defined="false" status="on">
    <parameter key="retry" value="1"/>
    <parameter key="timeout" value="3000"/>
    <parameter key="service-name" value=" _process "/>
    <parameter key="service-name-oid" value=".1.3.6.1.2.1.25.4.2.1.4"/>
  </service>
Add at bottom:
Example:
<monitor service="_process" class-name="org.opennms.netmgt.poller.monitors.HostResourceSwRunMonitor"/> 
NOTE:  Repeat process for all  processes that will be running and monitored via SNMP.
**NOTE:  ensure if the snmpwalk returns spaces for the value of the process that is being monitored that you include that space in the parameter-key service name.

Update capsd-configuration.xml for the resource created above:
Edit capsd-configuration.xml
<protocol-plugin protocol="<_PROCESS>" class-name="org.opennms.netmgt.capsd.plugins.SnmpPlugin" scan="on" user-defined="false">
                <property key="timeout" value="2000"/>
                <property key="retry" value="2"/>
        </protocol-plugin>
Example:
<protocol-plugin protocol="_PROCESS" class-name="org.opennms.netmgt.capsd.plugins.SnmpPlugin" scan="on" user-defined="false">
                <property key="timeout" value="2000"/>
                <property key="retry" value="2"/>
        </protocol-plugin> 
NOTE:  Repeat process for all  processes that will be running and monitored via SNMP.
Restart OpenNMS
Log in to OpenNMS UI
Default login:  admin/admin
Click Login
Click the Admin link

Click on Manage Provisioning group
Update Node
Click Edit Provisioning group
Add Node to Group:
• Click Add Service
• Click down arrow in service area
• Select <_PROCESS”X”>  
NOTE:  Repeat for all services that will be monitored.

• Click Save
• Click add node category
• Select appropriate category for node being added.
• Click Save
• Click Done
Synchronize data with the database:
Click Synchronize button
Check status of Node:
Click on Node List
Click Log out
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: monitoring a particual process

neelakandan
Thanks a lot. I will go ahead and try this.

On Tue, Dec 13, 2011 at 9:07 PM, kutthroat [via OpenNMS] <[hidden email]> wrote:
Log in to node that is going to be monitored as root user

Ensure the appropriate snmp rpm packages are installed
Navigate to /etc/snmpd
Edit snmpd.conf file
Add the following view to allow the NMS server to see the  processes:
view    systemview      included  .1.3.6.1.2.1.25.4.2.1.4

Restart the snmpd daemon
# service snmpd restart
Log in to OpenNMS server as root
Execute an snmpwalk to see the snmp process table on the effected node.
Example:
# snmpwalk -v2c  -O n -c <snmp_community_name> <TARGET_IP> .1.3.6.1.2.1.25.4.2.1.4  

NOTE:  You can grep for  services, however ensure that they are running on the node being queried.

Create new Package:

Edit poller-configuration.xml
Enter the following information:
<package name="package_name">
        <filter>IPADDR != '0.0.0.0'</filter>
        <include-range begin="<IP_BEGIN_RANGE>" end="<IP_END_RANGE>"/>
        <rrd step="300">
            <rra xmlns="">RRA:AVERAGE:0.5:1:2016</rra>
            <rra xmlns="">RRA:AVERAGE:0.5:12:1488</rra>
            <rra xmlns="">RRA:AVERAGE:0.5:288:366</rra>
            <rra xmlns="">RRA:MAX:0.5:288:366</rra>
            <rra xmlns="">RRA:MIN:0.5:288:366</rra>
        </rrd>
  <downtime begin="0" end="120000" interval="5000"/>
        <downtime begin="120000" end="43200000" interval="120000"/>
        <downtime begin="43200000" end="432000000" interval="600000"/>
        <downtime begin="432000000" delete="true"/>
</package>
Save File
Add Services to  Package
Enter Service name tag before downtime begin tag in the  package created above

<service name=" <_PROCESS>" interval="300000" user-defined="false" status="on">
    <parameter key="retry" value="1"/>
    <parameter key="timeout" value="3000"/>
    <parameter key="service-name" value=" <_PROCESS>"/>
    <parameter key="service-name-oid" value=".1.3.6.1.2.1.25.4.2.1.4"/>
  </service>
Example:
<service name=" _Process " interval="300000" user-defined="false" status="on">
    <parameter key="retry" value="1"/>
    <parameter key="timeout" value="3000"/>
    <parameter key="service-name" value=" _process "/>
    <parameter key="service-name-oid" value=".1.3.6.1.2.1.25.4.2.1.4"/>
  </service>
Add at bottom:
Example:
<monitor service="_process" class-name="org.opennms.netmgt.poller.monitors.HostResourceSwRunMonitor"/> 
NOTE:  Repeat process for all  processes that will be running and monitored via SNMP.
**NOTE:  ensure if the snmpwalk returns spaces for the value of the process that is being monitored that you include that space in the parameter-key service name.

Update capsd-configuration.xml for the resource created above:
Edit capsd-configuration.xml
<protocol-plugin protocol="<_PROCESS>" class-name="org.opennms.netmgt.capsd.plugins.SnmpPlugin" scan="on" user-defined="false">
                <property key="timeout" value="2000"/>
                <property key="retry" value="2"/>
        </protocol-plugin>
Example:
<protocol-plugin protocol="_PROCESS" class-name="org.opennms.netmgt.capsd.plugins.SnmpPlugin" scan="on" user-defined="false">
                <property key="timeout" value="2000"/>
                <property key="retry" value="2"/>
        </protocol-plugin> 
NOTE:  Repeat process for all  processes that will be running and monitored via SNMP.
Restart OpenNMS
Log in to OpenNMS UI
Default login:  admin/admin
Click Login
Click the Admin link

Click on Manage Provisioning group
Update Node
Click Edit Provisioning group
Add Node to Group:
• Click Add Service
• Click down arrow in service area
• Select <_PROCESS”X”>  
NOTE:  Repeat for all services that will be monitored.

• Click Save
• Click add node category
• Select appropriate category for node being added.
• Click Save
• Click Done
Synchronize data with the database:
Click Synchronize button
Check status of Node:
Click on Node List
Click Log out



If you reply to this email, your message will be added to the discussion below:
http://opennms.530661.n2.nabble.com/monitoring-a-particual-process-tp6896879p7090341.html
To unsubscribe from monitoring a particual process, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: monitoring a particual process

fixer81
In reply to this post by kutthroat
Hi,

I've used the configuration you specified, but regardless of the state (started/stopped) of remote host service OpenNMS shows outage/disable state.

For training purposes I want to monitor crond process. My specification of service section:

<service name="CROND" interval="300000" user-defined="false" status="on">
    <parameter key="retry" value="1"/>
    <parameter key="timeout" value="3000"/>
    <parameter key="service-name" value=" cron"/>
    <parameter key="service-name-oid" value=".1.3.6.1.2.1.25.4.2.1.xxx"/>
  </service>

I don't have remote access to the test environment now, but oid value points service name - type string. Snmpwalk-test of oid result: " cron" - with space before.

Should I use the " cron" in any case, when you mention "_PROCESS"?

What else can I check?

--
Thanks,
Andy
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: monitoring a particual process

kutthroat

When I run the snmpwalk and grep for cron  --- I see this as the output

 

.1.3.6.1.2.1.25.4.2.1.2.3766 = STRING: "crond"

 

This would be the process name (string) you would be looking for.  Replace the <_PROCESS> with that string. 

 

From: fixer81 [via OpenNMS] [mailto:ml-node+[hidden email]]
Sent: Thursday, March 22, 2012 1:36 PM
To: Paul Kutzler
Subject: Re: monitoring a particual process

 

Hi, I've used the configuration you specified, but regardless of the state (started/stopped) of remote host service OpenNMS shows outage/disable state. For training purposes I want to monitor crond process. My specification of service section: I don't have remote access to the test environment now, but oid value points service name - type string. Snmpwalk-test of oid result: " cron" - with space before. Should I use the " cron" in any case, when you mention "_PROCESS"? What else can I check? -- Thanks, Andy


If you reply to this email, your message will be added to the discussion below:

http://opennms.530661.n2.nabble.com/monitoring-a-particual-process-tp6896879p7396289.html

To unsubscribe from monitoring a particual process, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: monitoring a particual process

fixer81

Thanks - works fine for me :)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: monitoring a particual process

kaboodle
In reply to this post by neelakandan
Hi,

Thanks for this.  Very useful information.

I followed every step on this post, however, it did'nt quite work for me.  I always get the message

'crond outage identified on interface 192.168.40.154 with reason code:
HostResourceSwRunMonitor service not found, addr=192.168.40.154,
service-name=crond'

Here is the resulte of my snmpwalk:

snmpwalk -v2c -O n -c public 192.168.40.154 .1.3.6.1.2.1.25.4.2.1.4' (removed some unecessary entries)

.1.3.6.1.2.1.25.4.2.1.4.5253 = STRING: "sendmail: accepting connections"
.1.3.6.1.2.1.25.4.2.1.4.5263 = STRING: "sendmail: Queue runner@01:00:00 for
/var/spool/clientmqueue"
.1.3.6.1.2.1.25.4.2.1.4.5273 = STRING: "gpm"
.1.3.6.1.2.1.25.4.2.1.4.5303 = STRING: "crond"
.1.3.6.1.2.1.25.4.2.1.4.5337 = STRING: "xfs"
.1.3.6.1.2.1.25.4.2.1.4.5366 = STRING: "/usr/sbin/atd"

And here is my poller-configuration.xml

--- service part---
<service name="crond" interval="300000" user-defined="false" status="on"> 
        <parameter key="retry" value="1"/> 
        <parameter key="timeout" value="3000"/> 
        <parameter key="service-name" value="crond"/> 
        <parameter key="service-name-oid" value=".1.3.6.1.2.1.25.4.2.1.4"/>
</service> 
--- end of service part---

--- monitor part---
<monitor service="crond"
class-name="org.opennms.netmgt.poller.monitors.HostResourceSwRunMonitor"/> 
--- end of monitor part---

And below is my capsd-configuration.xml

<protocol-plugin protocol="crond"
class-name="org.opennms.netmgt.capsd.plugins.SnmpPlugin" scan="on"
user-defined="false"> 
        <property key="timeout" value="2000"/> 
        <property key="retry" value="2"/>
</protocol-plugin>

I am using opennms version 1.10.7 running under centos5.8 64bit.

Appreciate any help.

Many thanks!
Loading...