check script bash
Closed this issue · 1 comments
Hello everyone,
Feature explanation
I want to monitor a bash script "script.sh", which is executed in service.
ps -eaf:
/ bin / bash / data // scripts / script.sh
What is the value of the wanted feature ?
/usr/lib/centreon/plugins/centreon_linux_snmp.pl --plugin = os :: linux :: snmp :: plugin --mode = processcount --hostname = 10.21.2.227 --snmp-version = '
2c '--snmp-community =' ro-sdse '--process-name =' script.sh '--process-path =' / data / script / trait_pfe.sh '--process-args =' '- regexp-na
me --regexp-path --regexp-args --warning = '' --critical = '1:'
Of course, when I put --process-name = 'bash' –process-path = '' it works, but that's not what I'm looking for;)
Additional information
1 - Is it possible to do this with the "OS-Linux-Process-Generic-SNMP-custom" plugin. I have done some tests but I can't do it ... There are, maybe some arguments to specify
2 - Another way would be that centreon can consult the "systemctl status script"
ideas ?
Best regards
response
usr/lib/centreon/plugins/centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=processcount --hostname=XXX.XXX.XXX.XXX --snmp-version='XX' --snmp-community='XXXXX' --process-name='bash' --process-path='' --process-args='script.sh' --regexp-name --regexp-path --regexp-args --warning='' --critical='1:' --memory --cpu --verbose