Hi All,
i need to check if someone of my services has been not assigned to any servicegroup in Nagios XI.
Is there an easy way to do that? without check any single services obviously (i have 7000 services)
Basically I have some service group like:
CPU
Interface Status
Bandwidth
Memory
ecc ecc
If I make the sum of the services in all this service group, I get a number that is less of the number of all services taken from Nagiosxi Service Status Summary. So It means that I forgot to assign the service group to some services, and I need to find this services to correct my mistake.
Thanks
Alex
Find Out Services without Service group assigned
-
adminskymed
- Posts: 19
- Joined: Tue Feb 20, 2018 5:40 am
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Find Out Services without Service group assigned
Hello, @adminskymed. Unfortunately, there is no such functionality. You could build your own script that pulls services and service groups from the database and compares them, but this is something outside of the regular support scope.
You may try the following DB query to see services without service groups but it will only work in some instances(maybe worth a try anyway):
You may try the following DB query to see services without service groups but it will only work in some instances(maybe worth a try anyway):
Otherwise, you'd have to come up with some more complicated query that looks at the tables, links between tables and matches them.echo "SELECT service_description FROM tbl_service WHERE servicegroups=0;" | mysql -u root -pnagiosxi nagiosql
echo "SELECT * from tbl_lnkServicegroupToService;" | mysql -u root -pnagiosxi nagiosql
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
adminskymed
- Posts: 19
- Joined: Tue Feb 20, 2018 5:40 am
Re: Find Out Services without Service group assigned
Thanks for your reply.
I found out a problem in the nagiossql database.
Basically if I add a service to servicegroup from service configuration page in nagiosxi than I can see "servicegroup" number in tbl_service changes,
but if I add a service to servicegroup from service group configuration page in nagiosxi, serviegroup field in tbl_service doesn't change.
I think it is a bug. I hope it could be solved in some way.
Ale
I found out a problem in the nagiossql database.
Basically if I add a service to servicegroup from service configuration page in nagiosxi than I can see "servicegroup" number in tbl_service changes,
but if I add a service to servicegroup from service group configuration page in nagiosxi, serviegroup field in tbl_service doesn't change.
I think it is a bug. I hope it could be solved in some way.
Ale
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Find Out Services without Service group assigned
@adminskymed, There are different tables for services assigned to service groups from the service settings and from service groups. The other table can be also found in the nagiosql database but its more complicated because it uses links and you'd need to combine information from multiple tables at once.
echo "SELECT * FROM tbl_lnkServicegroupToService;" | mysql -u root -pnagiosxi nagiosql
echo "SELECT * FROM tbl_lnkServiceToServicegroup;" | mysql -u root -pnagiosxi nagiosql
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.