Page 1 of 1

Service table display issue

Posted: Mon Aug 26, 2013 3:45 pm
by tonyyarusso
I have a particular set of services that aren't displaying properly in XI, but are fine in Core. Here's how it looks in Core:
host_core.png
And here's how it looks in XI:
host_xi.png
As you can see, there are two issues:
1) If there is more than one active alert on the service, only the first one is shown.
2) If there is more than one active alert on the previous service, the following service ends up shunted over on the right without a label.

Here's the raw plugin output for the "North Exurbs WX" service as an example:

Code: Select all

Weather Warning: <a href="http://alerts.weather.gov/cap/wwacapget.php?x=MN124F12BDF6B4.HeatAdvisory.124F12DADE50MN.MPXNPWMPX.17d1979702c177d9600c23d4ba18e9e3" class="ext_link">Heat Advisory</a>, <a href="http://alerts.weather.gov/cap/wwacapget.php?x=MN124F12BDF6B4.ExcessiveHeatWarning.124F12DADE50MN.MPXNPWMPX.90c0555f68c059fd6355f825a2f50cf1" class="ext_link">Excessive Heat Warning</a>|'Severity'=2;0;3;0;4 'Urgency'=2;0;2;-1;3 'Certainty'=3;0;3;0;4 'Active Alerts'=2;;;0;
I'm suspecting that somewhere in the service parsing and display code the comma isn't being properly escaped.

Re: Service table display issue

Posted: Mon Aug 26, 2013 3:59 pm
by abrist
There is a good chance that the html tags are messing with the display. Can you wrap this plugin to cleanup the extra html tags or remove the comma?

Re: Service table display issue

Posted: Mon Aug 26, 2013 4:49 pm
by tonyyarusso
Looks like it's the HTML tags that are the issue - I have those in there so I can click to details right from the service status. So apparently those are what XI needs to escape.

Re: Service table display issue

Posted: Mon Aug 26, 2013 5:16 pm
by tonyyarusso
Here's a Firebug grab of what it's producing for the service status detail page:
page_source.png

Re: Service table display issue

Posted: Mon Aug 26, 2013 6:23 pm
by scottwilkerson
I would almost bet this is because the output is being truncated when going into the DB, (default for output field is 255 chars)

run the following

Code: Select all

mysql -pnagiosxi nagios
describe nagios_servicestatus 
select output from nagios_servicestatus ss,nagios_objects o where ss.service_object_id=o.object_id and name2='North Exurbs WX';
If output appears cutoff, you can increase the size of output by running something like the following where 1024 is the new size

Code: Select all

mysql -pnagiosxi nagios
alter table nagios_servicestatus modify output VARCHAR(1024) NOT NULL DEFAULT '';
After the change you will need to wait for the next check results to come in before the change would be seen.

Re: Service table display issue

Posted: Mon Aug 26, 2013 6:54 pm
by tonyyarusso
Oooh, yup. Forgot that XI and Core read the status info from different places. That did the trick, thanks.

Re: Service table display issue

Posted: Tue Aug 27, 2013 9:45 am
by slansing
Closing as resolved.