servicegroup member status not shown

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
elinagios
Posts: 146
Joined: Thu Feb 16, 2017 3:45 am

servicegroup member status not shown

Post by elinagios »

Hello

we have created a servicegroup that holds the most critical services to us. This configuration was imported from Nagios Core. Now when comparing this servicegroup services, that are either critical, warning, unknown, not in downtime and not acknowledged the result is different in Nagios Core and Nagios XI.
Nagios XI only shows services that servicegroup has been added via service, it doesnt show those services that have been added via servicegroup and add service from there. Nagios Core shows both. How can i fix this? As this servicegroup holds over 1000 services, it's not really option to go through each one of them and change how its been added to the servicegroup.

Mirgo
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: servicegroup member status not shown

Post by lmiltchev »

Nagios XI only shows services that servicegroup has been added via service, it doesnt show those services that have been added via servicegroup and add service from there. Nagios Core shows both. How can i fix this?
Can you elaborate on this? Are you talking about the "Service Group Status" page (Home > Servicegroup Overview)? Regardless of what method you used (adding a servicegroup to a service, or adding services to a servicegroup), the servicegroup members should show up...

Here's a simple example:

1. I defined a servicegroup called "PING", and added to members:

Code: Select all

define servicegroup {
       servicegroup_name             		PING
       alias                         		PING
       members                       		localhost,PING,MacOSX,Ping

}
2. Next, I added the servicegroup "PING" to the "Ping" service on my "Windows7" host.

Code: Select all

define service {
	host_name			Windows7
	service_description		Ping
	use				xiwizard_windowsserver_ping_service
	servicegroups			PING
	max_check_attempts		5
	check_interval			5
	retry_interval			1
	check_period			xi_timeperiod_24x7
	notification_interval		60
	notification_period		xi_timeperiod_24x7
	notifications_enabled		1
	contacts			nagiosadmin
	_xiwizard			windowsserver
	register			1
	}
3. I went to the "Service Group Status" page, and I can see all 3 members.
example01.PNG
What is the version of Nagios XI that you are currently using? Have you checked the following?

1. If you have any crashed db tables/error?

Code: Select all

tail /var/log/mysqld.log
or

Code: Select all

tail /var/log/mariadb/mariadb.log
2. If the issue goes away if you restart services:

Code: Select all

service nagios stop
service ndo2db restart
service nagios start
3. Can you successfully apply configuration? Do you see any config errors when you run the "Config File Management" tool (Write Configs > Verify Files)?
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
elinagios
Posts: 146
Joined: Thu Feb 16, 2017 3:45 am

Re: servicegroup member status not shown

Post by elinagios »

Yeah, there was one problem when i tried to verify files, fixed that and the picture is better but still not entirely Ok i think.
The servicegroup summary pictures added.
When i look the the servicegroup from core config, it shows a lot more services then from the servicegroup status summary.
Mariadb log doesnt show any errors and i restarted the services as you suggested.
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: servicegroup member status not shown

Post by tgriep »

The difference in the numbers could be that the Services are deactivated.
I did a quick test and deactivated one of the services in a service group and the the number shown on the Manage Services button did not change but the number in the service group status decreased by one.
Could that be it?
Be sure to check out our Knowledgebase for helpful articles and solutions!
elinagios
Posts: 146
Joined: Thu Feb 16, 2017 3:45 am

Re: servicegroup member status not shown

Post by elinagios »

No, the services are not deactivated, but there seems to be a small glitch.
Once i open the service group(from core config manager), it shows manage services 1455, i click manage services under assign membership and then close the window, it shows 1211 manage services. If i close the service group and reopen that, it shows again 1455.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: servicegroup member status not shown

Post by tgriep »

It sounds like there could be an issue with the MYSQL index for that service group. Lets run a repair and see if that fixes the issue. Run the following as root on the Nagios server.

Code: Select all

mysqlcheck -f -r -u root -pnagiosxi --databases nagiosql --use_frm
Post back if this fixed the issue for that Service Group.
Be sure to check out our Knowledgebase for helpful articles and solutions!
elinagios
Posts: 146
Joined: Thu Feb 16, 2017 3:45 am

Re: servicegroup member status not shown

Post by elinagios »

No, the symptoms remained the same for that servicegroup. No errors were shown in the output, but there were few lines as:
warning : Number of rows changed from 0 to 7
info : Delete link points outside datafile at 4672
What did those mean?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: servicegroup member status not shown

Post by tgriep »

When using the use_frm option, it tells MySQL not to trust the information in the .MYI file header and to re-create it using information from the .frm file.
Some of the data had to be updated and those messages are showing you what was repaired / changed to recreate the tables.

At this point, the service group looks like it will have to be recreated as the repair cannot fix the data used in the service group index.
Be sure to check out our Knowledgebase for helpful articles and solutions!
elinagios
Posts: 146
Joined: Thu Feb 16, 2017 3:45 am

Re: servicegroup member status not shown

Post by elinagios »

What is the best way to recreate it? Starting from 0 and adding the services one by one isnt an option.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: servicegroup member status not shown

Post by tgriep »

There is not an automatic way to recreate the group, it will have to recreated manually.
When a service group is created, all it contains are links to the services in the MYSQL database, if a service is deleted, it is removed from the system but the link in the service group may not have been removed because of corruption, etc...
One thing to try is to open up the Service Group and see if you can see any blank entries, remove those and see if that fixes the issue,
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked