Skip to main content

I’m trying to use host discovery as per:

  https://docs.centreon.com/docs/monitoring/discovery/hosts-discovery/

(with the Generic SNMP host discovery provider)

 

Unfortunately, neither “execute immediately” nor scheduled jobs seem to ever progress from ‘scheduled’ to ‘running’ - the host discovery UI has them indefinitely stuck at ‘scheduled’, 0s duration, 0 hosts discovered, “execute now” and “show results” greyed out.

What could I be missing?

 

Where would I find logs to dig into what’s (not) going on here?

How would I need to call /usr/lib/centreon/plugins//centreon_generic_snmp.pl --plugin=apps::protocols::snmp::plugin --mode to see host discovery happening manually?


Hello, 

 

First, you can enable debug logs for Centreon Gorgone in "Administration  >  Parameters  >  Debug" then check "Centreon Gorgone debug" and "Save"

After that, you could relaunch an host discovery, you should see lines like this in /var/log/centreon-gorgone/gorgoned.log : 

2024-03-05 11:01:09 - DEBUG - Eproxy] Send message: schannel = 8] laction = COMMAND] Mtoken = discovery_4_0c58d3f7] 8target = 8~~7]  data = {"content":n{"command":"/usr/lib/centreon/plugins//centreon_generic_snmp.pl --plugin=os::linux::local::plugin --mode=discovery-snmp --subnet='x.x.x.x/y' --snmp-community='public' --snmp-version='2c' --snmp-port='161' --snmp-timeout='30' ","metadata":{"job_id":"4","pkg_install":{"centreon-plugin-Applications-Protocol-Snmp":20230608},"source":"autodiscovery-host-job-discovery"},"timeout":300}],"instant":1}]

 

Then you'll be able to test the command manually by copying the "command" statement : 

su - centreon-engine
/usr/lib/centreon/plugins//centreon_generic_snmp.pl --plugin=os::linux::local::plugin --mode=discovery-snmp --subnet='x.x.x.x/y' --snmp-community='public' --snmp-version='2c' --snmp-port='161' --snmp-timeout='30'

 


Thank you @selkostali great advice!

Looking at the logs, I quickly found that I was missing the correct host name in /etc/centreon-gorgone/config.d/31-centreon-api.yaml as per https://docs.centreon.com/docs/administration/secure-platform/

So, the web server was redirecting everything to HTTPS, but the certificate name would not match the ‘host’ 127.0.0.1 obviously.
Also, I needed the appropriate (local) root CA certificate installed in /etc/pki/ca-trust/source/anchors/ and run update-ca-trust afterwards.

 

Host discovery works great for me now!


Reply