[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/[….] --process-name=’centengine’ [...]`.
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)
[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/[….] --process-name=’centengine’ [...]`.
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)
@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;