Closed Cool34000 closed 3 years ago
Could you test it locally (without nrpe) ?
centreon_plugins.exe --plugin="apps::activedirectory::local::plugin --mode="dcdiag" --config="scripts/centreon/conf/dcdiag.xml" --language="en"
CRITICAL: test Connectivity WARNING: test FsmoCheck |
So it's working. i don't know why it's not working with nrpe.
You could perhaps test again now that configuration files are embedded (you don't need --config
anymore).
Hi @Cool34000
Could you please tell us if the problem still appears now that XML config is embedded?
Thanks
Hi,
Sorry the server doesn't exists anymore (it was replaced with a 2019 Server) It's working on this one
Hi,
I have the same problem on another server... Same behaviour: it's not working from the poller but working locally. NSClient is the last available (Centreon-NSClient-0.5.2.41-20201207-x64.exe)
# /usr/lib64/nagios/plugins/check_centreon_nrpe -H x.x.x.x -p 5666 -t 55 -u -m 8192 -c check_centreon_plugins -a 'apps::activedirectory::local::plugin' 'dcdiag' ' --language="fr" '
UNKNOWN: Cannot match output test (maybe you need to set the good language) |
"C:\Program Files\Centreon NSClient++\scripts\centreon\centreon_plugins.exe" --plugin="apps::activedirectory::local::plugin" --mode="dcdiag" --language="fr"
ag"
CRITICAL: test Connectivity WARNING: test FsmoCheck |
Any hints to see what's the result of the command (I don't see anything with --debug option)
Do you use the last plugin ? https://github.com/centreon/centreon-nsclient-build/releases/tag/20201207190634
Do you use the last plugin ? https://github.com/centreon/centreon-nsclient-build/releases/tag/20201207190634
Yes, latest version
By curiosity try using NSClient++ new RestAPI instead of NRPE ?
/usr/lib/centreon/plugins/centreon_protocol_nrpe.pl
--plugin=apps::protocols::nrpe::plugin
--custommode=nsclient
--hostname=x.y.z.t
--port=8443
--username=centreon
--password=centreon
--new-api
--ssl-opt='SSL_verify_mode => SSL_VERIFY_NONE'
--mode=query
--command=check_centreon_plugins
--arg='apps::activedirectory::local::plugin'
--arg='dcdiag'
--arg='--language="fr"'
Hi,
Sorry for dumb question but how do I install the new RestAPI? centreon_protocol_nrpe.pl is not found on my poller...
yum install centreon-nrpe-plugin -y
Le paquet centreon-nrpe-plugin-2.15-4.el7.centos.x86_64 est déjà installé dans sa dernière version
yum install *nrpe* -y
installs:
But still not found after that!
Also
# updatedb
# locate centreon_protocol_nrpe.pl
Gives me nothing...
OK, I managed to do something but I still get the error!
First, I installed these dependencies:
yum install perl-URI-Encode perl-JSON-XS -y
Then I switched "centreon_protocol_nrpe.pl" to "centreon_plugins.pl" :
# /usr/lib/centreon/plugins/centreon_plugins.pl --plugin=apps::protocols::nrpe::plugin --custommode=nsclient --hostname=x.x.x.x --port=8443 --username=centreon --password=centreon --new-api --ssl-opt='SSL_verify_mode => SSL_VERIFY_NONE' --mode=query --command=check_centreon_plugins --arg='apps::activedirectory::local::plugin' --arg='dcdiag' --arg='--language="fr"'
But I was getting a 403 response, so I switched the username to "admin" instead of "centreon":
# /usr/lib/centreon/plugins/centreon_plugins.pl --plugin=apps::protocols::nrpe::plugin --custommode=nsclient --hostname=x.x.x.x --port=8443 --username=admin --password=centreon --new-api --ssl-opt='SSL_verify_mode => SSL_VERIFY_NONE' --mode=query --command=check_centreon_plugins --arg='apps::activedirectory::local::plugin' --arg='dcdiag' --arg='--language="fr"'
UNKNOWN: Cannot match output test (maybe you need to set the good language) |
======> request send
GET https://x.x.x.x:8443/api/v1/queries/check_centreon_plugins/commands/execute?apps%3A%3Aactivedirectory%3A%3Alocal%3A%3Aplugin&dcdiag&--language%3D%22fr%22
Authorization: Basic YWRtaW46Y2VudHJlb24=
User-Agent: centreon::plugins::backend::http::useragent
======> response done
HTTP/1.1 200 OK
Content-Length: 159
Client-Date: Wed, 23 Dec 2020 07:57:55 GMT
Client-Peer: x.x.x.x:8443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /CN=localhost
Client-SSL-Cert-Subject: /CN=localhost
Client-SSL-Cipher: AES256-GCM-SHA384
Client-SSL-Socket-Class: IO::Socket::SSL
Set-Cookie: token=yapnxrpMCARCr4zdGc81tBDKsMlaZTXC; path=/
Set-Cookie: uid=admin; path=/
{"command":"check_centreon_plugins","lines":[{"message":"UNKNOWN: Cannot match output test (maybe you need to set the good language) |","perf":{}}],"result":3}
nsclient return = {"command":"check_centreon_plugins","lines":[{"message":"UNKNOWN: Cannot match output test (maybe you need to set the good language) |","perf":{}}],"result":3}
Try using --arg='--language=fr'
instead of --arg='--language="fr"'
, I remember having faced same sort of issue.
Try using
--arg='--language=fr'
instead of--arg='--language="fr"'
, I remember having faced same sort of issue.
Same result
Hi,
I just tested with the last version of Centreon NSClient (version 0.5.2.41-20211102) and it works now
/usr/lib64/nagios/plugins/check_centreon_nrpe -H 10.0.1.4 -p 5666 -t 55 -u -m 8192 -c check_centreon_plugins -a 'apps::microsoft::activedirectory::local::plugin' 'dcdiag' ' --language="en" '
OK: Connectivity - Advertising - FrsEvent - SysVolCheck - KccEvent - MachineAccount - Replications - RidManager - Services - FsmoCheck |
Hi,
I have a server where the plugin does'nt work:
/usr/lib64/nagios/plugins/check_centreon_nrpe -H 10.0.1.4 -p 5666 -t 55 -u -m 8192 -c check_centreon_plugins -a 'apps::activedirectory::local::plugin' 'dcdiag' ' --config="scripts/centreon/conf/dcdiag.xml" --language="en" '
UNKNOWN: Cannot match output test (maybe you need to set the good language) |
Here's the DCDIAG.EXE output on the server: