Host status information shows "OK: No data received yet"

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
rifelixd
Posts: 35
Joined: Mon Nov 06, 2017 12:50 pm

Re: Host status information shows "OK: No data received yet"

Post by rifelixd »

kyang wrote:Hello,

Did you enable the option in the nagios.cfg? Currently it is set to 0 by default. Please edit and change it to 1 and then restart nagios.

Code: Select all

check_host_freshness=1

service nagios restart
Did you also have freshness checking enabled for the host in the XI CCM?
Hi @kyang,
Thanks for your response. I have got check host freshness set to 1 in nagios.cfg file of the Server.
I followed the document and set to check_dummy with Arg1 - 2 and Arg2 - "Host disconnected" .
Now all my hosts are disconnected although services inside this hosts are updating fine.
Please be advised that all these hosts are being pulled passively over port 5667 (NSCA).
Is there something I am not doing it right ?
Please advise.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Host status information shows "OK: No data received yet"

Post by scottwilkerson »

you stated
I am using passive service using NCSA protocol and i would the host to return failed check if data not received over the port
Can you show us how you are sending the NSCA data for the host? I didn't see a post that outlined that.

You are sending a NSCA check for just the host as well as the services correct?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
rifelixd
Posts: 35
Joined: Mon Nov 06, 2017 12:50 pm

Re: Host status information shows "OK: No data received yet"

Post by rifelixd »

Can you show us how you are sending the NSCA data for the host? I didn't see a post that outlined that.
You are sending a NSCA check for just the host as well as the services correct?
Hi @scottwilkerson,

I am posting my nsclient file for your reference.

Code: Select all

[/modules]
CheckWMI = 1
NSCAClient = 1
NSClientServer = 1
CheckExternalScripts = 1
CheckSystem = 1
CheckEventLog = 1
CheckDisk = 1
Scheduler = 1

[/settings/default]
allowed hosts = localhost,<my server IP>
password = nsclientadmin

[/settings/NSCA/client]
channel = NSCA
hostname = auto

[/settings/NSCA/client/targets/default]
address = <my server IP>
encryption = 3
password = <password>
payload length = 4096

[/settings/scheduler/schedules/default]
interval = 5m

[/settings/scheduler/schedules]
Drive C: Disk Usage = CheckDriveSize MinWarn=10% MinCrit=5% Drive=C: ShowAll
Drive D: Disk Usage = CheckDriveSize MinWarn=10% MinCrit=5% Drive=D: ShowAll
Operating System Version = checkWMI "Query=Select Version,Caption from win32_OperatingSystem"
Installed Software Version = vbscheck

[/settings/external scripts]
allow arguments = 1
allow nasty characters = 1
timeout = 90

[/settings/external scripts/scripts]
vbscheck = cscript.exe //T:30 //NoLogo scripts\\versioncheck.vbs

[/settings/log]
date setting = %Y.%m.%d %H:%M:%S
file name = nsclient.log
level = info

[/settings/log/file]
max size = 2048000
The services are all updating in my local time but the host appear to be down. I set check_dummy following the guide posted by @kyang in previous thread.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Host status information shows "OK: No data received yet"

Post by scottwilkerson »

Add the following to the configs under

Code: Select all

[/settings/scheduler/schedules]

Code: Select all

host_check = Check_OK "Everything is working fine"

See page 7 here
https://assets.nagios.com/downloads/nag ... Checks.pdf
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
rifelixd
Posts: 35
Joined: Mon Nov 06, 2017 12:50 pm

Re: Host status information shows "OK: No data received yet"

Post by rifelixd »

Code: Select all

[/settings/scheduler/schedules]

Code: Select all

host_check = Check_OK "Everything is working fine"
@scottwilkerson,

I have added the command but returned with message- Command was not found: Check_OK in the Services status.
Is this because host are being pulled passively ?

Also, I am guessing even if this is added, its coming in as Service correct? I have no issues in setting the Services to prompt me "OK, Unknown, Warning, Critical" but what would i expect to see status changing for my host instead.

Please advise.
rifelixd
Posts: 35
Joined: Mon Nov 06, 2017 12:50 pm

Re: Host status information shows "OK: No data received yet"

Post by rifelixd »

Gurus,

Also, is there a way where my host will appear down if any/all services go down ?
Some sort of dependency where my host is controlled by the associated services ?
This way my issue is resolved.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Host status information shows "OK: No data received yet"

Post by scottwilkerson »

rifelixd wrote:I have added the command but returned with message- Command was not found: Check_OK in the Services status.
It should be there, lets try all lower case

Code: Select all

host_check = check_ok "Everything is working fine"
Here is the docs
https://docs.nsclient.org/reference/che ... /#check_ok
rifelixd wrote:Also, is there a way where my host will appear down if any/all services go down ?
Some sort of dependency where my host is controlled by the associated services ?
There isn't really any easy way to do this.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
rifelixd
Posts: 35
Joined: Mon Nov 06, 2017 12:50 pm

Re: Host status information shows "OK: No data received yet"

Post by rifelixd »

It should be there, lets try all lower case

Code: Select all

host_check = check_ok "Everything is working fine"
Hi @scottwilkerson, I tried all in lowercase but it returned with Command was not found: check_ok. checkok also return same.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Host status information shows "OK: No data received yet"

Post by scottwilkerson »

Sorry, I just noticed you don't have the module enable in your config to allow check_ok, add this under

Code: Select all

[/modules]

Code: Select all

CheckHelpers = 1
then restart the service

That was on page 4 here
https://assets.nagios.com/downloads/nag ... Checks.pdf
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
rifelixd
Posts: 35
Joined: Mon Nov 06, 2017 12:50 pm

Re: Host status information shows "OK: No data received yet"

Post by rifelixd »

[user]scottwilkerson[/user] wrote:Sorry, I just noticed you don't have the module enable in your config to allow check_ok, add this under

Code: Select all

[/modules]

Code: Select all

CheckHelpers = 1
then restart the service

That was on page 4 here
https://assets.nagios.com/downloads/nag ... Checks.pdf
@scottwilkerson, Thank you so much!. That did solved my issue :D
Locked