Page 1 of 1

Ho can I do a reports of selective hosts and their services?

Posted: Tue Oct 30, 2012 12:07 pm
by donvito7
Basically I need to create a weekly report of our UpTime.

We only concern about our production site of it. This is ping, http from one host, ping, http from other, ping, http and Myqsl

Is any way I can I create just the group of these services and hosts to create one click report?

Many thanx for any hints!

Re: Ho can I do a reports of selective hosts and their servi

Posted: Tue Oct 30, 2012 2:59 pm
by agriffin
Just put these into a service group and then run the report on that service group.

Re: Ho can I do a reports of selective hosts and their servi

Posted: Wed Oct 31, 2012 5:29 am
by donvito7
yes, but how the config would like if I need:

1. ping from server1
2. http from server1
3. ping from server2
4. http from server2
5. ping from server3
6. http from server3
7. Mysql from server3
8. Oracle from server4
9. servicexyz from server4
10. serviceABC from server4

I have created a file: servicegroups.cfg

define serviceroup{

servicegroup_name Ping & http

alias Ping&http

members server1,server2
check_command check_ping!150.0,25%!500.0,60%
check_command check_http
}


Is it correct?

Re: Ho can I do a reports of selective hosts and their servi

Posted: Wed Oct 31, 2012 6:12 am
by donvito7
I have created a file "servicegroups.cfg"


define serviceroup{

servicegroup_name Ping & http

alias Ping&http

members server1,check_ping!150.0,25%!500.0,60%,server2,check_http
}

If I restart the service I still can see "There are no service groups defined."

Is anything else I need to do to make it work?

Re: Ho can I do a reports of selective hosts and their servi

Posted: Wed Oct 31, 2012 9:29 am
by mguthrie
Is the servicegroups.cfg file being seen by the main nagios.cfg file?

Re: Ho can I do a reports of selective hosts and their servi

Posted: Wed Oct 31, 2012 9:36 am
by donvito7
I have added this line

cfg_file=/etc/nagios/servicegroups.cfg

but when I restart the service it fails.
Running configuration check... FAILED! Restart aborted. Check your Nagios configuration.

Re: Ho can I do a reports of selective hosts and their servi

Posted: Fri Nov 02, 2012 10:09 am
by donvito7
I have got:

# You can split other types of object definitions across several
# config files if you wish (as done here), or keep them all in a
# single config file.

#cfg_file=/etc/nagios/contactgroups.cfg
#cfg_file=/etc/nagios/contacts.cfg
#cfg_file=/etc/nagios/dependencies.cfg
#cfg_file=/etc/nagios/escalations.cfg
cfg_file=/etc/nagios/hosts.cfg
cfg_file=/etc/nagios/external.cfg
cfg_file=/etc/nagios/hostgroups.cfg
cfg_file=/etc/nagios/services.cfg
cfg_file=/etc/nagios/servicegroups.cfg
#cfg_file=/etc/nagios/timeperiods.cfg

but the service restart fails even if the file is empty or hashed out.

Re: Ho can I do a reports of selective hosts and their servi

Posted: Fri Nov 02, 2012 3:11 pm
by scottwilkerson
what are the permissions on?

Code: Select all

ls -l /etc/nagios/servicegroups.cfg