ahmed abdul
2017-01-13 15:15:18 UTC
Hello all,
I am using net-snmp package and monitoring some processes by using âprocâ
directive in snmpd.conf file. But the problem is that this method doesnât
work for the processes invoked by python/php.
For example, to monitor mysqld process I would do something like
*proc mysqld*
*monitor -r 60 -o prNames -o prErrMessage "procTable" prErrorFlag > 0 *
and above works and I see traps when mysqld is killed.
Now when I I do
*proc test_process*
*monitor -r 60 -o prNames -o prErrMessage "procTable" prErrorFlag > 0 *,
I never get traps when this process is killed.
Just to make sure here test_process is python process,
ps -ef | grep test_process
root 1000 1 0 Jan12 ? 00:01:05 python ./test_process.py
I figured out from the documentation, proc directive monitors the processes
as reported by /bin/ps -e , all processes invoked by python are seen as
just python processes.
Now for example if I need to monitor test_process.py using this directive
how should I do it ?
This process is now seen as just python process(not as test_process) when
you do ps -e and I am unable to use proc directive.
I would like to monitor several python and php processes by their names in
my system and send traps if they ever get killed/crashed for some reason.
Thanks
I am using net-snmp package and monitoring some processes by using âprocâ
directive in snmpd.conf file. But the problem is that this method doesnât
work for the processes invoked by python/php.
For example, to monitor mysqld process I would do something like
*proc mysqld*
*monitor -r 60 -o prNames -o prErrMessage "procTable" prErrorFlag > 0 *
and above works and I see traps when mysqld is killed.
Now when I I do
*proc test_process*
*monitor -r 60 -o prNames -o prErrMessage "procTable" prErrorFlag > 0 *,
I never get traps when this process is killed.
Just to make sure here test_process is python process,
ps -ef | grep test_process
root 1000 1 0 Jan12 ? 00:01:05 python ./test_process.py
I figured out from the documentation, proc directive monitors the processes
as reported by /bin/ps -e , all processes invoked by python are seen as
just python processes.
Now for example if I need to monitor test_process.py using this directive
how should I do it ?
This process is now seen as just python process(not as test_process) when
you do ps -e and I am unable to use proc directive.
I would like to monitor several python and php processes by their names in
my system and send traps if they ever get killed/crashed for some reason.
Thanks