Hello All
I want to monitor separately different processes running as services in windows with centreon, those processes runs all with the same executable.
How can i acheive this?
Thank you
Hello All
I want to monitor separately different processes running as services in windows with centreon, those processes runs all with the same executable.
How can i acheive this?
Thank you
So it’s not in a centreon directory, it’s the direct nsclient++
but
Tx
ok, so you don’t use the centreon-nsclient package which comes with some pre configured stuff
i have no idea what is not working here, the last thing I could is based on the previous screenshot (command not found on “check_service”) is that the “checksystem” module is not pre-loaded
it is in the the nsclient.ini, in a section called
[/modules]
; CheckSystem - Various system related checks, such as CPU load, process state, service state memory usage and PDH counters.
CheckSystem = 1
that’s the module you loaded manually in the debug console just above.
if this is missing, add that line “CheckSystem=1” to the /modules section and restart the nsclient service
Hello
CheckSystem=enabled change something not 1
But now i have a socket timeout for bothe commands
root@centreon-central plugins]# ./check_nrpe -2 -H srv-dial2 -c check_service
CHECK_NRPE STATE CRITICAL: Socket timeout after 10 seconds.
root@centreon-central plugins]#
Any idea?
Hello,
So sorry o totally missed you latest reply, thant you first of all
It seems to work
load CheckSystem
D core Loading module C:\Program Files\NSClient++\modules\CheckSystem.dll ()
L cli CheckSystem loaded successfully...
D w32system Loading counter: disk_queue_length_0 C: = \\SRV-DIAL2\PhysicalDisk(0 C:)\% Disk Time
D w32system Loading counter: disk_queue_length__Total = \\SRV-DIAL2\PhysicalDisk(_Total)\% Disk Time
check_cpu
L cli OK: OK: CPU load is ok.
L cli Performance data: 'total 5m'=0%;80;90 'total 1m'=1%;80;90 'total 5s'=3%;80;90
Hello, anyone could help? :)
hello
what is the status now, your last post said it worked.
as you did lots of things I’m having trouble following where you are and what is working or not
Hello,
Looks like doing the test on the machine itself work
load CheckSystem
D core Loading module C:\Program Files\NSClient++\modules\CheckSystem.dll ()
L cli CheckSystem loaded successfully...
D w32system Loading counter: disk_queue_length_0 C: = \\SRV-DIAL2\PhysicalDisk(0 C:)\% Disk Time
D w32system Loading counter: disk_queue_length__Total = \\SRV-DIAL2\PhysicalDisk(_Total)\% Disk Time
check_cpu
L cli OK: OK: CPU load is ok.
L cli Performance data: 'total 5m'=0%;80;90 'total 1m'=1%;80;90 'total 5s'=3%;80;90
But remotely no
lroot@centreon-central plugins]# ./check_nrpe -2 -H srv-dial2 -c checkservice
CHECK_NRPE STATE CRITICAL: Socket timeout after 10 seconds.
troot@centreon-central plugins]# ./check_nrpe -2 -H srv-dial2 -c check_service
CHECK_NRPE STATE CRITICAL: Socket timeout after 10 seconds.
troot@centreon-central plugins]#
ok, so it was working before you did something, I think you reinstalled the nsclient agent on the windows host if I remember correctly
now you have a socket timeout, be sure on your windows machine that only 1 nsclient agent is running (process nscp.exe)
be sure it is listening on the default port 5666 (you can see that in the performance monitor, network section, listening port, you should have a line “nscp.exe” listening on port 5666
also check this page : NRPE - NSClient++ it tells you what to look for in the nsclient.ini to be sure that all is setup correctly in that file so the check_nrpe command can work correctly.
I don’t know what is not working on your setup, usually you should use the “plugin pack” (or “connector”) from centreon to do these checks, but you are trying to make you checks manually, this needs a bit of knowledge on how nrpe and nsclient are working
if you look at the centreon doc : Windows NRPE 0.5 | Centreon Documentation the command line options have an additional parameters that is needed because the nsclient.ini that comes with the centreon package of nsclient needs an extra “ -P 8192 “ (capital P for “payload size”) (and a “-u” option which I don’t remember what it does exactly)
also check the “allowed_host” option in the .ini, this is the thing protecting your host from accepting nrpe command from a random ip address, be sure that this value is defined in your .ini and has the ip address of your poller (or its dns name)
Hello not really, it never worked.
It’s a fresh new install of the nsclient on the windows machine on whish a did enable the check
So on the machine itself it seems to work, but not remotely
Tx
I’ll take your advices and check them out
Tx
Well well well, i don’t really understand what’s happening here, there’s nothing listening to the 5666 port, i change the local account of the service to networkd account and also used a domain user , still not listening
Looks like my ini file is ok, it’s basic the one from default with the check_service enabled
Here’s my ini.
# If you want to fill this file with all available options run the following command:
# nscp settings --generate --add-defaults --load-all
# If you want to activate a module and bring in all its options use:
# nscp settings --activate-module <MODULE NAME> --add-defaults
# For details run: nscp settings --help
; in flight - TODO
[/settings/default]
; Undocumented key
password = xM8rqtsZOISdq7VU
; Undocumented key
allowed hosts = 10.4.1.66
; CACHE ALLOWED HOSTS - If host names (DNS entries) should be cached, improves speed and security somewhat but won't allow you to have dynamic IPs for your Nagios server.
cache allowed hosts = true
; TIMEOUT - Timeout when reading packets on incoming sockets. If the data has not arrived within this time we will bail out.
timeout = 30
; BIND TO ADDRESS - Allows you to bind server to a specific local address. This has to be a dotted ip address not a host name. Leaving this blank will bind to all available IP addresses.
bind to = UNKNOWN
; in flight - TODO
[/settings/NRPE/server]
; Undocumented key
verify mode = none
; Undocumented key
insecure = true
; DH KEY -
dh = ${certificate-path}/nrpe_dh_2048.pem
; PORT NUMBER - Port to use for NRPE.
port = 5666
; COMMAND ALLOW NASTY META CHARS - This option determines whether or not the we will allow clients to specify nasty (as in |`&><'"\p]{}) characters in arguments.
allow nasty characters = false
; EXTENDED RESPONSE - Send more then 1 return packet to allow response to go beyond payload size (requires modified client if legacy is true this defaults to false).
extended response = false
; COMMAND ARGUMENT PROCESSING - This option determines whether or not the we will allow clients to specify arguments to commands that are executed.
allow arguments = false
; ENABLE SSL ENCRYPTION - This option controls if SSL should be enabled.
use ssl = true
; in flight - TODO
[/modules]
; Undocumented key
CheckExternalScripts = disabled
; Undocumented key
CheckHelpers = disabled
; Undocumented key
CheckEventLog = disabled
; Undocumented key
CheckNSCP = disabled
; Undocumented key
CheckDisk = disabled
; Undocumented key
NRPEServer = enabled
; CheckSystem - Various system related checks, such as CPU load, process state, service state memory usage and PDH counters.
CheckSystem = enabled
; Realtime memory filters - A set of filters to use in real-time mode
[/settings/system/windows/real-time/memory]
; Legacy generic filters - A set of filters to use in real-time mode
[/settings/system/windows/real-time/checks]
; Realtime process filters - A set of filters to use in real-time mode
[/settings/system/windows/real-time/process]
; COUNTER - Definition for counter: default
[/settings/system/windows/counters/default]
; BUFFER SIZE - Size of buffer (in seconds) larger buffer use more memory
buffer size = UNKNOWN
; COUNTER - The counter to check
counter = UNKNOWN
; Interpret instances - IF we shoul interpret instance (default auto). Values: auto, true, false
instances = UNKNOWN
; FLAGS - Extra flags to configure the counter (nocap100, 1000, noscale)
flags = UNKNOWN
; COUNTER TYPE - The type of counter to use long, large and double
type = UNKNOWN
; COLLECTION STRATEGY - The way to handled values when collecting them: static means we keep the last known value, rrd means we store values in a buffer from which you can retrieve the average
collection strategy = UNKNOWN
; PDH Counters - Add counters to check
[/settings/system/windows/counters]
; disk_queue_length - To configure this create a section under: /settings/system/windows/counters/disk_queue_length
disk_queue_length = UNKNOWN
; Windows system - Section for system checks and system settings
[/settings/system/windows]
; Default buffer time - Used to define the default size of range buffer checks (ie. CPU).
default buffer length = 1h
; LOG SECTION - Configure log file properties.
[/settings/log/file]
; MAXIMUM FILE SIZE - When file size reaches this it will be truncated to 50% if set to 0 (default) truncation will be disabled
max size = -1
; LOG SETTINGS - Section for configuring the log handling.
[/settings/log]
; LOG LEVEL - Log level to use. Available levels are error,warning,info,debug,trace
level = info
; FILENAME - The file to write log data to. Set this to none to disable log to file.
file name = ${exe-path}/nsclient.log
; DATEMASK - The size of the buffer to use when getting messages this affects the speed and maximum size of messages you can recieve.
date format = %Y-%m-%d %H:%M:%S
; Realtime cpu filters - A set of filters to use in real-time mode
[/settings/system/windows/real-time/cpu]
; CRASH HANDLER - Section for configuring the crash handler.
[/settings/crash]
; RESTART SERVICE NAME - The url to submit crash reports to
restart target = NSCP
; CRASH ARCHIVE LOCATION - The folder to archive crash dumps in
archive folder = ${shared-path}/crash-dumps
; SUBMISSION URL - The url to submit crash reports to
submit url = https://crash.nsclient.org/post
;
[/paths]
; Path for module-path -
module-path = ${exe-path}/modules
; Path for certificate-path -
certificate-path = ${shared-path}/security
; Path for exe-path -
exe-path = C:\Program Files\NSClient++
; Path for shared-path -
shared-path = C:\Program Files\NSClient++
; INCLUDED FILES - Files to be included in the configuration
[/includes]
No idea what i made wrong, i of course checked the windows fw
from the doc https://docs.centreon.com/pp/integrations/plugin-packs/getting-started/how-to-guides/centreon-nsclient-tutorial/#nrpe
the allowed host is normally in the nrpe/server section,
(be sure to restart the windows service to be sure the modification is taken into account)
and if you use “payload length = 8192” in the .ini like in the doc, you must set “ -P 8192” in the command line
also you should have a “nsclient.log” in the program files directory, check there if there is an error message when you start the service
Nothing seems to work here for me :)
I’ll leave it like that, tx for trying :)
good day
Well i did investigate a little more and make it work a little better
I can do that remotely now
>root@centreon-central plugins]# ./check_nrpe -2 -H srv-dial2
I (0.5.2.41 2018-04-26) seem to be doing fine...
>root@centreon-central plugins]# ./check_nrpe -2 -H srv-dial2 -c check_service
CRITICAL: GoogleUpdaterInternalService132.0.6806.0=stopped (auto), GoogleUpdaterService132.0.6806.0=stopped (auto), RemoteRegistry=stopped (auto), WbioSrvc=stopped (auto), delayed (BITS=stopped (delayed), edgeupdate=stopped (delayed), gupdate=stopped (delayed), MapsBroker=stopped (delayed), sppsvc=stopped (delayed))
So i think it can works
Now i just cannot put an argument after the check_service
I start from here
https://nsclient.org/docs/reference/windows/CheckSystem/#check_service
so
./check_nrpe -2 -H srv-dial2 -c check_service service=snmp must show something no?
seems i’m missing something
/root@centreon-central plugins]# ./check_nrpe -2 -H srv-dial2 -c check_service service=nscp
CRITICAL: GoogleUpdaterInternalService132.0.6806.0=stopped (auto), GoogleUpdaterService132.0.6806.0=stopped (auto), RemoteRegistry=stopped (auto), WbioSrvc=stopped (auto), delayed (BITS=stopped (delayed), edgeupdate=stopped (delayed), gupdate=stopped (delayed), MapsBroker=stopped (delayed), sppsvc=stopped (delayed))
Any idea of what i am missing?
Tx
Hello
so i can do this
./check_nrpe -2 -H server -c check_service
I have a list of services
But i cannot speciofy a service
./check_nrpe -2 -H server -c check_service service=xyz isn’t working
From the host it works
check_service service=lanmanserver
L cli OK: OK: All 1 service(s) are ok.
L cli Performance data: 'lanmanserver'=4;0;0
I don’t know what i am missing
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.