[root@s-sup ~]# /usr/lib/centreon/plugins/centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=processcount --hostname=127.0.0.1 --snmp-version='2c' --snmp-community='XTZ' --process-name='centengine' --process-path='' --process-args='' --regexp-name --regexp-path --regexp-args --warning='' --critical='1:1' OK: Number of current processes running: 1 | 'nbproc'=1;;1:1;0; [root@s-sup ~]# /usr/lib/centreon/plugins/centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=processcount --hostname=127.0.0.1 --snmp-version='2c' --snmp-community='XYZ' --process-name='centengine' --process-path='' --process-args='' --regexp-name --regexp-path --regexp-args --warning='' --critical='1:1' --debug --process-status='running|runnable' OK: Number of current processes running: 1 | 'nbproc'=1;;1:1;0; Process '21900' [status: runnable] [name: centengine] [root@s-sup ~]# /usr/lib/centreon/plugins/centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=processcount --hostname=127.0.0.1 --snmp-version='2c' --snmp-community='XYZ' --process-name='centengine' --process-path='' --process-args='' --regexp-name --regexp-path --regexp-args --warning='' --critical='1:1' --debug OK: Number of current processes running: 1 | 'nbproc'=1;;1:1;0; Process '21900' [status: runnable] [name: centengine] [root@s-sup ~]# /usr/lib/centreon/plugins/centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=processcount --hostname=127.0.0.1 --snmp-version='2c' --snmp-community='XYZ' --process-name='centengine' --process-path='' --process-args='' --regexp-name --regexp-path --regexp-args --warning='' --critical='1:1' --debug CRITICAL: Number of current processes running: 8 | 'nbproc'=8;;1:1;0; Process '5679' [status: running] [name: centengine] Process '5684' [status: running] [name: centengine] Process '5675' [status: running] [name: centengine] Process '21900' [status: runnable] [name: centengine] Process '5686' [status: running] [name: centengine] Process '5685' [status: running] [name: centengine] Process '5683' [status: running] [name: centengine] Process '5687' [status: running] [name: centengine] [root@s-sup ~]# /usr/lib/centreon/plugins/centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=processcount --hostname=127.0.0.1 --snmp-version='2c' --snmp-community='XYZ' --process-name='centengine' --process-path='' --process-args='' --regexp-name --regexp-path --regexp-args --warning='' --critical='1:1' --debug --process-status='running|runnable' CRITICAL: Number of current processes running: 8 | 'nbproc'=8;;1:1;0; Process '5679' [status: running] [name: centengine] Process '5684' [status: running] [name: centengine] Process '5675' [status: running] [name: centengine] Process '21900' [status: runnable] [name: centengine] Process '5686' [status: running] [name: centengine] Process '5685' [status: running] [name: centengine] Process '5683' [status: running] [name: centengine] Process '5687' [status: running] [name: centengine] [root@s-sup ~]# /usr/lib/centreon/plugins/centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=processcount --hostname=127.0.0.1 --snmp-version='2c' --snmp-community='XYZ' --process-name='centengine' --process-path='' --process-args='' --regexp-name --regexp-path --regexp-args --warning='' --critical='1:1' CRITICAL: Number of current processes running: 8 | 'nbproc'=8;;1:1;0; [root@s-sup ~]#
I typed his two commands and mine with 5 minutes delay
Ok, an idea came to my mind during the weekend. Do you monitor centengine on Pollers from this server?
I guess that while the command is running, other centengine process checks are running as well and are erroneously checked as an engine process.
Using --process-path='/usr/sbin/' will avoid this. You can use the PROCESSPATH macro to set the value ‘/usr/sbin/’
Sims24, I’m not sure to fully understand your question.
I have only one server, no remote pollers.
I’ll update the command with your suggestion.
Thx
[root@s-sup ~]# /usr/lib/centreon/plugins/centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=processcount --hostname=127.0.0.1 --snmp-version='2c' --snmp-community='XTZ' --process-name='centengine' --process-path='' --process-args='' --regexp-name --regexp-path --regexp-args --warning='' --critical='1:1' OK: Number of current processes running: 1 | 'nbproc'=1;;1:1;0; [root@s-sup ~]# /usr/lib/centreon/plugins/centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=processcount --hostname=127.0.0.1 --snmp-version='2c' --snmp-community='XYZ' --process-name='centengine' --process-path='' --process-args='' --regexp-name --regexp-path --regexp-args --warning='' --critical='1:1' --debug --process-status='running|runnable' OK: Number of current processes running: 1 | 'nbproc'=1;;1:1;0; Process '21900' [status: runnable] [name: centengine] [root@s-sup ~]# /usr/lib/centreon/plugins/centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=processcount --hostname=127.0.0.1 --snmp-version='2c' --snmp-community='XYZ' --process-name='centengine' --process-path='' --process-args='' --regexp-name --regexp-path --regexp-args --warning='' --critical='1:1' --debug OK: Number of current processes running: 1 | 'nbproc'=1;;1:1;0; Process '21900' [status: runnable] [name: centengine] [root@s-sup ~]# /usr/lib/centreon/plugins/centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=processcount --hostname=127.0.0.1 --snmp-version='2c' --snmp-community='XYZ' --process-name='centengine' --process-path='' --process-args='' --regexp-name --regexp-path --regexp-args --warning='' --critical='1:1' --debug CRITICAL: Number of current processes running: 8 | 'nbproc'=8;;1:1;0; Process '5679' [status: running] [name: centengine] Process '5684' [status: running] [name: centengine] Process '5675' [status: running] [name: centengine] Process '21900' [status: runnable] [name: centengine] Process '5686' [status: running] [name: centengine] Process '5685' [status: running] [name: centengine] Process '5683' [status: running] [name: centengine] Process '5687' [status: running] [name: centengine] [root@s-sup ~]# /usr/lib/centreon/plugins/centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=processcount --hostname=127.0.0.1 --snmp-version='2c' --snmp-community='XYZ' --process-name='centengine' --process-path='' --process-args='' --regexp-name --regexp-path --regexp-args --warning='' --critical='1:1' --debug --process-status='running|runnable' CRITICAL: Number of current processes running: 8 | 'nbproc'=8;;1:1;0; Process '5679' [status: running] [name: centengine] Process '5684' [status: running] [name: centengine] Process '5675' [status: running] [name: centengine] Process '21900' [status: runnable] [name: centengine] Process '5686' [status: running] [name: centengine] Process '5685' [status: running] [name: centengine] Process '5683' [status: running] [name: centengine] Process '5687' [status: running] [name: centengine] [root@s-sup ~]# /usr/lib/centreon/plugins/centreon_linux_snmp.pl --plugin=os::linux::snmp::plugin --mode=processcount --hostname=127.0.0.1 --snmp-version='2c' --snmp-community='XYZ' --process-name='centengine' --process-path='' --process-args='' --regexp-name --regexp-path --regexp-args --warning='' --critical='1:1' CRITICAL: Number of current processes running: 8 | 'nbproc'=8;;1:1;0; [root@s-sup ~]#
I typed his two commands and mine with 5 minutes delay
Nevermind, it was inaccurate anyway! What happened is that your CLI checks (above) got added to the SNMP process table. Without additional filtering on the process path, it erroneously matches `/usr/lib/centreon/plugins/s….] --process-name=’centengine’ g...]`.
The SNMP process table gets refreshed every minute. That explains that you could feel like the process check result might be random (sometimes 1, sometimes more than 1)
I wanted to click on Like and I clicked on ‘Best answer’. Woopsie ^^
Anyway I did the change when I answered you and until now no more errors :)
Well, no errors in 24h since the change.
I think it‘s time to say : Issue resolved.
Thank you @sims24
Now, time to move to another challenge > updating my 2.8.32 Centreon hehe
@Benjamin_b happy to hear that! We will set this value as a default in the template, so thank you for confirming that it works as expected.
Oh, I will probably write a post soon about Centreon experts best practices to upgrade old centreon platforms. But, I’m not sure it will be ready before christmas;