The CPU_Load.XML error in PNP4Nagiosxi

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: The CPU_Load.XML error in PNP4Nagiosxi

Post by rkennedy »

Can you post your nsclient configuration file for us to take a look at?
Former Nagios Employee
lancewang
Posts: 13
Joined: Mon Dec 28, 2015 10:20 pm

Re: The CPU_Load.XML error in PNP4Nagiosxi

Post by lancewang »

Hi,

The content of nsc.ini is here below.
'password=nagios' uncomment or not are the same result.
'password=' was also...

Code: Select all

[modules]
FileLogger.dll
CheckSystem.dll
CheckDisk.dll
NSClientListener.dll
NRPEListener.dll
SysTray.dll
CheckEventLog.dll
CheckHelpers.dll
CheckExternalScripts.dll
NRPEClient.dll
CheckTaskSched.dll



[Settings]
;  This is the password (-s) that is required to access NSClient remotely. If you leave this blank everyone will be able to access the daemon remotly.
;password=nagios

;# ALLOWED HOST ADDRESSES
allowed_hosts=10.1.192.0/24

;# USE THIS FILE

use_file=1

; # USE SHARED MEMORY CHANNELS

[log]
;debug=1

;# LOG FILE

;file=nsclient.log
;
;# LOG DATE MASK

;date_mask=%Y-%m-%d %H:%M:%S

;# LOG ROOT FOLDER
;root_folder=exe

[NSClient]
;# ALLOWED HOST ADDRESSES
;allowed_hosts=

;# NSCLIENT PORT NUMBER
port=12489

;# BIND TO ADDRESS
;bind_to_address=

;# SOCKET TIMEOUT
;socket_timeout=30

[NRPE]
;# NRPE PORT NUMBER
;port=5666

;# COMMAND TIMEOUT
;command_timeout=60

;# COMMAND ARGUMENT PROCESSING
;allow_arguments=0

;# COMMAND ALLOW NASTY META CHARS
;allow_nasty_meta_chars=0

;# USE SSL SOCKET
;use_ssl=1
;
;# BIND TO ADDRESS
; bind_to_address=

;# ALLOWED HOST ADDRESSES
;allowed_hosts=
;
;# SCRIPT DIRECTORY
;script_dir=scripts\
;
;# SOCKET TIMEOUT
;socket_timeout=30

[Check System]
;# CPU BUFFER SIZE
;CPUBufferSize=1h
;
;# CHECK RESOLUTION
;CheckResolution=10
;
;# CHECK ALL SERVICES
;check_all_services[SERVICE_BOOT_START]=ignored
;check_all_services[SERVICE_SYSTEM_START]=ignored
;check_all_services[SERVICE_AUTO_START]=started
;check_all_services[SERVICE_DEMAND_START]=ignored
;check_all_services[SERVICE_DISABLED]=stopped

[External Script]
;# COMMAND TIMEOUT
;command_timeout=60
;
;# COMMAND ARGUMENT PROCESSING
;allow_arguments=0
;
;# COMMAND ALLOW NASTY META CHARS
;allow_nasty_meta_chars=0
;
;# COMMAND ALLOW NASTY META CHARS
;script_dir=c:\my\script\dir

[External Scripts]
;check_es_long=scripts\long.bat
;check_es_ok=scripts\ok.bat
;check_es_nok=scripts\nok.bat
;check_vbs_sample=cscript.exe //T:30 //NoLogo scripts\check_vb.vbs
;check_powershell_warn=cmd /c echo scripts\powershell.ps1 | powershell.exe -command -

[External Alias]
;alias_cpu=checkCPU warn=80 crit=90 time=5m time=1m time=30s
;alias_disk=CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED
;alias_service=checkServiceState CheckAll
;alias_mem=checkMem MaxWarn=80% MaxCrit=90% ShowAll type=physical
;alias_event_log=CheckEventLog file=application file=system filter=new filter=out MaxWarn=1 MaxCrit=1 filter-generated=>2d filter-severity==success filter-severity==informational truncate=1023 unique descriptions  "syntax=%severity%: %source%: %message% (%count%)"


; [includes]
; myotherfile.ini
; real.ini


[NSCA Agent]
;interval=5
; Values:
;	0 = None	(Do NOT use this option)
;	1 = Simple XOR  (No security, just obfuscation, but very fast)
;   2 = DES
;   3 = 3DES (Triple DES)
;	4 = CAST-128
;	6 = xTEA
;	8 = BLOWFISH
;	9 = TWOFISH
;	11 = RC2
;	14 = RIJNDAEL-128 (AES)
;	20 = SERPENT
;encryption_method=14
;
;# ENCRYPTION PASSWORD
;password=
;
;# BIND TO ADDRESS
;bind_to_address=
;
;# LOCAL HOST NAME
;hostname=
;
;# NAGIOS SERVER ADDRESS
;nsca_host=192.168.0.1
;
;# NAGIOS SERVER PORT
;nsca_port=5667
;
;# CHECK COMMAND LIST

[NSCA Commands]
;my_cpu_check=checkCPU warn=80 crit=90 time=20m time=10s time=4
;my_mem_check=checkMem MaxWarn=80% MaxCrit=90% ShowAll type=page
;my_svc_check=checkServiceState CheckAll exclude=wampmysqld exclude=MpfService
;host_check=check_ok

[NRPE Handlers]
;command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
;test=c:\test.bat foo $ARG1$ bar
;check_disk1=/usr/local/nagios/libexec/check_disk -w 5 -c 10
;check_cpu=inject checkCPU warn=80 crit=90 5 10 15
;check_eventlog=inject CheckEventLog Application warn.require.eventType=error warn.require.eventType=warning critical.require.eventType=error critical.exclude.eventType=info truncate=1024 descriptions
;check_disk_c=inject CheckFileSize ShowAll MaxWarn=1024M MaxCrit=4096M File:WIN=c:\ATI\*.*
;# But be careful:
; dont_check=inject dont_check This will "loop forever" so be careful with the inject command...
;# Check some escapings...
; check_escape=inject CheckFileSize ShowAll MaxWarn=1024M MaxCrit=4096M "File: foo \" WIN=c:\\WINDOWS\\*.*"
;# Some real world samples
;nrpe_cpu=inject checkCPU warn=80 crit=90 5 10 15
;nrpe_ok=scripts\ok.bat
;check_multi_line=scripts\multi_line.bat
;#
;# The sample scripts
;#
;check_long=scripts\long.bat
;check_ok=scripts\ok.bat
;check_nok=scripts\xlong.bat
;check_vbs=cscript.exe //T:30 //NoLogo scripts\check_vb.vbs

;# REMOTE NRPE PROXY COMMANDS
;  A list of commands that check other hosts.
;  Used by the NRPECLient module
[NRPE Client Handlers]
check_other=-H 192.168.0.1 -p 5666 -c remote_command -a arguments

;# LUA SCRIPT SECTION
;  A list of all Lua scripts to load.
;[LUA Scripts]
;scripts\test.lua
Last edited by tmcdonald on Thu Jan 07, 2016 10:31 am, edited 1 time in total.
Reason: Please use [code][/code] tags around long output
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: The CPU_Load.XML error in PNP4Nagiosxi

Post by rkennedy »

Can you try running the command over the CLI and post the full input / output for us to review?
Former Nagios Employee
lancewang
Posts: 13
Joined: Mon Dec 28, 2015 10:20 pm

Re: The CPU_Load.XML error in PNP4Nagiosxi

Post by lancewang »

I found a funny case when I run the commands in nagios xi host below.


[root@localhost libexec]# ./check_nt -H 10.1.192.207 -v CPULOAD -l 5,80,90
connect to address 10.1.192.207 and port 1248: Connection refused
could not fetch information from server

[root@localhost libexec]# ./check_nt -H 10.1.192.207 -v CPULOAD -l 5,80,90 -p 12489
CPU Load 0% (5 min average) | '5 min avg Load'=0%;80;90;0;100

Why the message feedback 'port 1248: Connection refused...'

The correct result when I check with check_nt -p 12489.
The nsc.ini file already define port number in 10.1.192.207 .

[NSClient]
;# NSCLIENT PORT NUMBER
port=12489

And the 'netstat -an' command print in 10.1.192.207

使用中連線

協定 本機位址 外部位址 狀態
TCP 0.0.0.0:12489 0.0.0.0:0 LISTENING

What should I configure any files in Nagios xi host?

Thanks.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: The CPU_Load.XML error in PNP4Nagiosxi

Post by rkennedy »

The default port for check_nt is 1248. That's why you need to define 12489 in your command.

Navigate to Configure -> Core Config Manager -> ### Services -> Find the service that is reporting the 'NSClient - ERROR: Invalid password' error.

Can you post a screenshot of the common settings?
Former Nagios Employee
lancewang
Posts: 13
Joined: Mon Dec 28, 2015 10:20 pm

Re: The CPU_Load.XML error in PNP4Nagiosxi

Post by lancewang »

Hi,

I study in Nagios core upgrade to Nagios XI.
We had over 300 hosts to monitor.
We'll configure in /usr/local/nagios/etc/static manually.
And I implement with Managing-Config-Files-Manually-With-Nagios-XI.pdf, but another problems found.
So I just fix simpler case to make monitoring platform work.

I configured the nsc.ini file form reomot client here below.

[NSClient]
;# NSCLIENT PORT NUMBER
; This is the port the NSClientListener.dll will listen to.
port=1248
;

The message show 'connect to address 10.1.192.207 and port 12489: Connection refused'.

How can I fix it.
Thanks,

Best Regards,
Lancewang
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: The CPU_Load.XML error in PNP4Nagiosxi

Post by rkennedy »

[NSClient]
;# NSCLIENT PORT NUMBER
; This is the port the NSClientListener.dll will listen to.
port=1248
;
This line should read port=12489, can you adjust it as needed and restart your NSClient++ service? Once that is done, force check your services and let us know the result.
Former Nagios Employee
lancewang
Posts: 13
Joined: Mon Dec 28, 2015 10:20 pm

Re: The CPU_Load.XML error in PNP4Nagiosxi

Post by lancewang »

Hi,

The nsc.ini file original define port number in remote hosts.
I will restart nsc service when I change any config file.

[NSClient]
;# NSCLIENT PORT NUMBER
port=12489

And the 'netstat -an' command print in 10.1.192.207

使用中連線

協定 本機位址 外部位址 狀態
TCP 0.0.0.0:12489 0.0.0.0:0 LISTENING

But the error message show 'NSClient - ERROR: Invalid password'.
What happen problems are in NSClient hosts?
You do not have the required permissions to view the files attached to this post.
lancewang
Posts: 13
Joined: Mon Dec 28, 2015 10:20 pm

Re: The CPU_Load.XML error in PNP4Nagiosxi

Post by lancewang »

Hi,

I monitored the NSClient host with Nagios core and Nagios XI at the same time.
Nagios core had correct message but Nagios XI not.
The nsc.ini file defined allowed hosts in NSClient host .

[Settings]
allowed_hosts=10.1.192.0/24 ####(Nagios core and Nagios XI subnet)

And they configured the same content in hosts.cfg and services.cfg.
I don't know why it is.

Thanks,

Best Regards,
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: The CPU_Load.XML error in PNP4Nagiosxi

Post by rkennedy »

I think there your XI command definition may be sending a password, can you take a look at the command that these services are using?

Can you also paste the Service Definition for one of the 'Invalid Password' checks?
Former Nagios Employee
Locked