Service Monitoring Update

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
MOHAMMAD1412
Posts: 9
Joined: Sat Feb 20, 2016 8:39 am

Service Monitoring Update

Post by MOHAMMAD1412 »

Hi All,

I am new user to Nagios Tool.I like to know how to update the IP Address of an Service getting Monitored.User getting warning alerts stating the service is not responding.

Thanks In advance
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Service Monitoring Update

Post by Box293 »

This would be in a host definition file, most likely in /usr/local/nagios/etc/objects/

After making the change you'll need to restart the nagios service:

Code: Select all

service nagios restart
What version of Nagios Core are you using?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
MOHAMMAD1412
Posts: 9
Joined: Sat Feb 20, 2016 8:39 am

Re: Service Monitoring Update

Post by MOHAMMAD1412 »

Hi

Thanks for the update !!

I already updated the Hostname IP with the new one in hosts.cfg file but still it showing warning alert in console.

Please let me know if any more configuration file needs to be updated.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Service Monitoring Update

Post by eloyd »

Can you post your services.cfg and/or hosts.cfg file with the appropriate information showing what service/host you are monitoring?
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Service Monitoring Update

Post by rkennedy »

Also - can you post a screenshot of what you're seeing? It will help us to know what we're looking for in the configuration files you post.
Former Nagios Employee
MOHAMMAD1412
Posts: 9
Joined: Sat Feb 20, 2016 8:39 am

Re: Service Monitoring Update

Post by MOHAMMAD1412 »

Hi All,

Thanks for the update !!

As requested please find the hosts.cfg,service.cfg and command.cfg

Hosts.cfg
define host {
use generic-host
host_name portal
alias portal
contact_groups unix-xxxx, portal-xxxx
address XX.XXX.XX.XXX
}

Service.cfg
define service{
use xxxx-service
hostgroup_name portal-xxxx
service_description PORTAL-HTTP
normal_check_interval 5
retry_check_interval 2
max_check_attempts 3
contact_groups portal-xxxx
notification_interval 120
notification_options w,u,c,r
check_command xxx_check_portal
}

command.cfg
define command{
command_name xxx_check_portal
command_line /usr/local/nagios/libexec/portal-check -H portal.xxx.xxx
}

Thanks In advance
Attachments
Service Alert
Service Alert
service alert.png (11.03 KiB) Viewed 2586 times
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Service Monitoring Update

Post by eloyd »

It looks as though you are hard-coding the portal address in your check command:

Code: Select all

command_line /usr/local/nagios/libexec/portal-check -H portal.xxx.xxx
Try changing that to -h $HOSTADDRESS$ and it will pick up the host address of the machine, not a hard-coded value.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Service Monitoring Update

Post by rkennedy »

@eloyd is right - give this a try and let us know if you have any further questions.
Former Nagios Employee
MOHAMMAD1412
Posts: 9
Joined: Sat Feb 20, 2016 8:39 am

Re: Service Monitoring Update

Post by MOHAMMAD1412 »

Hi All,

Thanks for your updates !!

Issue got resolved. The problem was with the URL which is getting monitored.Once updated the URL with the new one , issue got fixed.

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

Re: Service Monitoring Update

Post by rkennedy »

Glad to see it resolved.

Going to close this thread out now, but feel free to make a new one if you ever need assistance in the future!
Former Nagios Employee
Locked