Ad Widget

Collapse

Check process is running with SNMP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Julien76
    Junior Member
    • Sep 2020
    • 4

    #1

    Check process is running with SNMP

    Hi,

    I want to monitor if my linux process is running.

    In this example, I want monitor e2guardian process:
    HOST-RESOURCES-MIB::hrSWRunName.12869 = STRING: "e2guardian"
    HOST-RESOURCES-MIB::hrSWRunPath.12869 = STRING: "/usr/sbin/e2guardian"

    I use the 5.0 version of Zabbix.

    In the key of the template: hrSWRunPath
    Oid SNMP: 1.3.6.1.2.1.25.4.2.1.4::hrSWRunPath["index","HOST-RESOURCES-MIB::hrSWRunPath", "/usr/sbin/e2guardian"]

    This not working.

    What's the problem ?

    Thanks to helping.
  • Nog
    Junior Member
    • Aug 2020
    • 5

    #2
    Hi,

    You can create a discovery like : discovery[{#HRSWRUNNAME}, 1.3.6.1.2.1.25.4.2.1.2] and filter (with regex or not), by name to get only the right process in "Filter" tab, like: {#HRSWRUNNAME} matches (e2guardian|otherprocess|etc).
    After that, you can create item with the good index, like : 1.3.6.1.2.1.25.4.2.1.7.{#SNMPINDEX} to get the process status.

    Comment

    • Julien76
      Junior Member
      • Sep 2020
      • 4

      #3
      Hi,

      No it's too hard for nothing.
      With Centreon it's just 1 things to monitor the service.

      Comment

      • Nog
        Junior Member
        • Aug 2020
        • 5

        #4
        It's an ultra basic discovery, in one oid filter by a regex without create a script, and it's over. It's too hard for you, maybe, i don't know your level sorry.
        You're welcome, and good luck.
        Last edited by Nog; 29-09-2020, 18:47.

        Comment

        • tim.mooney
          Senior Member
          • Dec 2012
          • 1427

          #5
          Originally posted by Julien76
          I want to monitor if my linux process is running.

          In this example, I want monitor e2guardian process:
          HOST-RESOURCES-MIB::hrSWRunName.12869 = STRING: "e2guardian"
          HOST-RESOURCES-MIB::hrSWRunPath.12869 = STRING: "/usr/sbin/e2guardian"

          I use the 5.0 version of Zabbix.

          In the key of the template: hrSWRunPath
          Oid SNMP: 1.3.6.1.2.1.25.4.2.1.4::hrSWRunPath["index","HOST-RESOURCES-MIB::hrSWRunPath", "/usr/sbin/e2guardian"]

          This not working.
          You've obviously read the documentation on SNMP items and dynamic indexes, since what you're trying to do is very similar to the example in the documentation.

          First, you do have the necessary MIB installed on your Zabbix server and it's being loaded by net-snmp, correct? If net-snmp isn't loading the MIB, then I would expect that using "HOST-RESOURCES-MIB" in the 2nd argument wouldn't work. The Zabbix documentation for SNMP has information on enabling MIBs: https://www.zabbix.com/documentation...ypes/snmp/mibs

          Are you getting any error messages? Is the item getting marked as unsupported in the web interface?

          Comment

          Working...