Ad Widget

Collapse

Monitoring linux service by SNMP agent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MarcoUK
    Junior Member
    • Oct 2021
    • 26

    #1

    Monitoring linux service by SNMP agent

    Hi,
    I need to monitoring collectd service on linux machine using SNMP agent.

    This is my status:
    Code:
    snmpwalk -v 2c -c public 192.168.0.100 . | grep HOST-RESOURCES-MIB | grep collectd
    HOST-RESOURCES-MIB::hrSWRunName.17231 = STRING: "collectdmon"
    HOST-RESOURCES-MIB::hrSWRunName.17232 = STRING: "collectd"
    HOST-RESOURCES-MIB::hrSWRunPath.17231 = STRING: "/usr/sbin/collectdmon"
    HOST-RESOURCES-MIB::hrSWRunPath.17232 = STRING: "collectd"
    HOST-RESOURCES-MIB::hrSWRunParameters.17231 = STRING: "-P /var/run/collectd.pid -- -C /etc/collectd/collectd.conf"
    HOST-RESOURCES-MIB::hrSWRunParameters.17232 = STRING: "-C /etc/collectd/collectd.conf -f"
    HOST-RESOURCES-MIB::hrSWInstalledName.28 = STRING: "collectd-core-5.x.x-x"
    HOST-RESOURCES-MIB::hrSWInstalledName.494 = STRING: "collectd-x.x.x"
    I created this item:
    Code:
    Name: snmp_proc_collectd
    Type: SNMP agent
    Key: snmp_proc_collectd
    SNMP OID: HOST-RESOURCES-MIB::hrSWRunPath["index", "HOST-RESOURCES-MIB::hrSWRunName", "collectd"]
    Type of information: Text
    If I click on test I receive "collectd" as result.

    Now I tried to create a trigger (alert in case don't found collecd as below:
    Code:
    Name: test_trigger_collectd
    Severity: High
    Expression: {hawkeye-servers:snmp_proc_collectd.regexp(collectd)}=0
    but it doesn't alert in case of process id down
    Last edited by MarcoUK; 04-11-2021, 11:20.
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    You called the item "snmp_proc_auditd", but you're referencing snmp_proc_collectd in the trigger expression. Seems like a mismatch there.

    Comment

    • MarcoUK
      Junior Member
      • Oct 2021
      • 26

      #3
      Originally posted by tim.mooney
      You called the item "snmp_proc_auditd", but you're referencing snmp_proc_collectd in the trigger expression. Seems like a mismatch there.
      Thanks, I wrong to copy, I fixed it, but it doesn't work.

      Comment

      • MarcoUK
        Junior Member
        • Oct 2021
        • 26

        #4
        I solved:


        Code:
        Name: test_trigger_collectd
        Severity: High
        Expression: {hawkeye-servers:snmp_proc_collectd.regexp("^(collectd)")}= 0

        Comment

        Working...