Hi, is it possible to monitor a process by its name without installing the agent?
No, I don’t think that is possible … you need a way to poll the data either with a script/snmp extend from the agent.
Maybe if you can provide more details someone can craft a possible solution.
I don’t install agents but i do extend SNMP a lot to check on certain things.
I was just asking about this in discord today. If LibreNMS supported the UCD-SNMP::prTable then process monitoring could become quite easy.
http://www.net-snmp.org/docs/man/snmpd.conf.html see the “Process Monitoring” section.
Basically, configuration of the snmpd on each client by adding an entry to snmpd.conf like
proc httpd 50 2
Would give you an snmp pollable process table…not sure my coding skills are up-to-par for this, but I was looking at the include/polling/storage files just today.
proc ntpd
proc httpd 50 2
snmpwalk -v 2c -c public myserver 1.3.6.1.4.1.2021.2.1
UCD-SNMP-MIB::prIndex.1 = INTEGER: 1
UCD-SNMP-MIB::prIndex.2 = INTEGER: 2
UCD-SNMP-MIB::prNames.1 = STRING: ntpd
UCD-SNMP-MIB::prNames.2 = STRING: httpd
UCD-SNMP-MIB::prMin.1 = INTEGER: 1
UCD-SNMP-MIB::prMin.2 = INTEGER: 2
UCD-SNMP-MIB::prMax.1 = INTEGER: 0
UCD-SNMP-MIB::prMax.2 = INTEGER: 50
UCD-SNMP-MIB::prCount.1 = INTEGER: 1
UCD-SNMP-MIB::prCount.2 = INTEGER: 11
UCD-SNMP-MIB::prErrorFlag.1 = INTEGER: noError(0)
UCD-SNMP-MIB::prErrorFlag.2 = INTEGER: noError(0)
UCD-SNMP-MIB::prErrMessage.1 = STRING:
UCD-SNMP-MIB::prErrMessage.2 = STRING:
UCD-SNMP-MIB::prErrFix.1 = INTEGER: noError(0)
UCD-SNMP-MIB::prErrFix.2 = INTEGER: noError(0)
UCD-SNMP-MIB::prErrFixCmd.1 = STRING:
UCD-SNMP-MIB::prErrFixCmd.2 = STRING:
PR in git hub are always welcomed
Makes sense. But you would still need to modify the snmpd.conf file on the server you are monitoring right?
Guess I’ve been doing this the long way. I use extend scripts to check status of a service or anything. And use the nagios snmp service checks to poll the OID. Works well but I’m interested to try your way. May cut me time from making scripts to check services.