Problem with Open Service Problems

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Problem with Open Service Problems

Post by WillemDH »

Hello

I'm experiencing issues with the Open Service Problems view in Nagios XI since I modified long_output of output tables, following Troy's pdf guide "Nagios XI does not display full command output" of his VMware plugin.

Code: Select all

echo "use nagios;alter table nagios_servicestatus modify output varchar(65535) not null;alter table
nagios_servicestatus modify long_output varchar(65535) not null;alter table nagios_servicestatus modify
perfdata varchar(65535) not null;" | mysql -pnagiosxi
echo "use nagios;alter table nagios_hoststatus modify output varchar(65535) not null;alter table
nagios_hoststatus modify long_output varchar(65535) not null;alter table nagios_hoststatus modify perfdata
varchar(65535) not null;" | mysql -pnagiosxi
echo "use nagios;alter table nagios_servicechecks modify output varchar(65535) not null;alter table
nagios_servicechecks modify long_output varchar(65535) not null;alter table nagios_servicechecks modify
perfdata varchar(65535) not null;" | mysql -pnagiosxi
echo "use nagios;alter table nagios_hostchecks modify output varchar(65535) not null;alter table
nagios_hostchecks modify long_output varchar(65535) not null;alter table nagios_hostchecks modify perfdata
varchar(65535) not null;" | mysql -pnagiosxi
See also this thread

http://support.nagios.com/forum/viewtop ... it=+output

And see attached screenshot for an idea of what's going wrong...

What can I do to fix this? I'd like to keep enabling the extended output, but with a 'normal' open service problems view.. It seems it's always the second entry in the open service problems view where there is some sort of overflow of the table to the right.... I'm seeing this issue in Chrome and in Firefox.

Grtz

Willem
You do not have the required permissions to view the files attached to this post.
Nagios XI 5.8.1
https://outsideit.net
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Problem with Open Service Problems

Post by Box293 »

I believe character returns have been added to the end of each line when copied from the PDF. There are four long commands.

Code: Select all

echo "use nagios;alter table nagios_servicestatus modify output varchar(65535) not null;alter table nagios_servicestatus modify long_output varchar(65535) not null;alter table nagios_servicestatus modify perfdata varchar(65535) not null;" | mysql -pnagiosxi

echo "use nagios;alter table nagios_hoststatus modify output varchar(65535) not null;alter table nagios_hoststatus modify long_output varchar(65535) not null;alter table nagios_hoststatus modify perfdata varchar(65535) not null;" | mysql -pnagiosxi

echo "use nagios;alter table nagios_servicechecks modify output varchar(65535) not null;alter table nagios_servicechecks modify long_output varchar(65535) not null;alter table nagios_servicechecks modify perfdata varchar(65535) not null;" | mysql -pnagiosxi

echo "use nagios;alter table nagios_hostchecks modify output varchar(65535) not null;alter table nagios_hostchecks modify long_output varchar(65535) not null;alter table nagios_hostchecks modify perfdata varchar(65535) not null;" | mysql -pnagiosxi
If anyone knows how to stop LibreOffice Writer from adding character returns to the end of the lines I would be very appreciative, it's hard to document a procedure when this happens :(
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jwelch
Posts: 225
Joined: Wed Sep 05, 2012 12:49 pm

Re: Problem with Open Service Problems

Post by jwelch »

Alternative solution:
For my checks that produced lots of formatted ouput, I have the check write the output
to one of two files:
/usr/local/nagios/share/ssi/results/services/ok/<servicename>/<host>.html
or
/usr/local/nagios/share/ssi/results/services/problem/<servicename>/<host>.html

and just include a link to the current results and either the previous ok or problem results
depending on the current state of the service. That way if there is a problem, I can see the
last OK details before the problem, or if it's OK, I can see the last problem details.

So the displayed nagios problem detail can be either the normal detail if the output is less than
some cutoff number of characters or just the links...like in this case where there is a current problem:
[VIEW DETAIL DATA]

[VIEW LAST OK]

If the check was currently OK, the details would show:
[VIEW DETAIL DATA]

[VIEW LAST PROBLEM]
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Problem with Open Service Problems

Post by WillemDH »

Troy,

I tried another time with the commands in your post:

Code: Select all

echo "use nagios;alter table nagios_servicestatus modify output varchar(65535) not null;alter table nagios_servicestatus modify long_output varchar(65535) not null;alter table nagios_servicestatus modify perfdata varchar(65535) not null;" | mysql -pnagiosxi

echo "use nagios;alter table nagios_hoststatus modify output varchar(65535) not null;alter table nagios_hoststatus modify long_output varchar(65535) not null;alter table nagios_hoststatus modify perfdata varchar(65535) not null;" | mysql -pnagiosxi

echo "use nagios;alter table nagios_servicechecks modify output varchar(65535) not null;alter table nagios_servicechecks modify long_output varchar(65535) not null;alter table nagios_servicechecks modify perfdata varchar(65535) not null;" | mysql -pnagiosxi

echo "use nagios;alter table nagios_hostchecks modify output varchar(65535) not null;alter table nagios_hostchecks modify long_output varchar(65535) not null;alter table nagios_hostchecks modify perfdata varchar(65535) not null;" | mysql -pnagiosxi
I'm not sure yet if it helped, as I don't have a lot of open service problems at the moment..

I'll keep you posted.

Grtz

Willem
Nagios XI 5.8.1
https://outsideit.net
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Problem with Open Service Problems

Post by WillemDH »

Ok, things are not looking good here. Please advice how to fix this. Check attached screenshot. It seems the other Operations screen and Operations Center are also acting weird sometimes... :(
it's not always the case. It seems to depend on the number of open service problems or something.. Sometimes it displays ok.
You do not have the required permissions to view the files attached to this post.
Nagios XI 5.8.1
https://outsideit.net
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Problem with Open Service Problems

Post by tmcdonald »

Can you save that page as HTML then send it to us? Either post or PM it.

Update: File received and placed in shared drive
Former Nagios employee
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Problem with Open Service Problems

Post by WillemDH »

Trevor,

Sent you pm.

Grtz
Nagios XI 5.8.1
https://outsideit.net
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Problem with Open Service Problems

Post by tmcdonald »

Not sure if that captures everything - not seeing the actual table with the host and service status. Did you get the iframe contents?

This might be easier done through a remote session instead of sending HTML over forum private messages. Would you like to open a ticket for this?
Former Nagios employee
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Problem with Open Service Problems

Post by WillemDH »

Trevor,

I created a ticket this morning for this issue. In the meantime however I discovered the true reason for the table overflow. It seems like it is not caused by character returns in the box293_vmware plugin documentation. The real cause is the event that is passed through NSCA.

As I noticed it was always the same service that was in the row where the table overflow was located, I looked into this specific event on the Windows Server generating it. In Nagios XI the event looked like this:

Code: Select all

error 105 System.Runtime.Serialization 4.0.0.0: An event or events were not traced. Original event string: http://msdn.microsoft.com/nl-BE/library/System.Runtime.Serialization.ReadObjectEnd.aspxFinished ReadObject/LM/W3SVC/1622073421/Root/Digipolis/Digipolis.EPostService-1-130771764073324544
In the Windows eventlog the event looked like this however:

Code: Select all

An event or events were not traced.
 Original event string:
 <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Stop"><TraceIdentifier>http://msdn.microsoft.com/nl-BE/library/System.ServiceModel.Diagnostics.ActivityBoundary.aspx</TraceIdentifier><Description>Activity boundary.</Description><AppDomain>/LM/W3SVC/1622073421/Root/Digipolis/Digipolis.EPostService-1-130771764073324544</AppDomain><ExtendedData xmlns="http://schemas.microsoft.com/2006/08/ServiceModel/DictionaryTraceRecord"><ActivityName>Execute 'Digipolis.AlfrescoService.IDocumentService.GetChildren'.</ActivityName><ActivityType>ExecuteUserCode</ActivityType></ExtendedData></TraceRecord>
 Exception: System.IO.IOException: The drive cannot find the sector requested.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.FileStream.Write(Byte[] array, Int32 offset, Int32 count)
   at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
   at System.IO.StreamWriter.Write(String value)
   at System.Diagnostics.XmlWriterTraceListener.WriteEscaped(String str)
   at System.Diagnostics.XmlWriterTraceListener.WriteStartHeader(String source, TraceEventType eventType, Int32 id, TraceEventCache eventCache)
   at System.Diagnostics.XmlWriterTraceListener.TraceData(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, Object data)
   at System.Diagnostics.TraceSource.TraceData(TraceEventType eventType, Int32 id, Object data)
   at System.ServiceModel.Diagnostics.DiagnosticTrace.TraceEvent(TraceEventType type, Int32 code, String msdnTraceCode, String description, TraceRecord trace, Exception exception, Object source)
 Process Name: w3wp
 Process ID: 94168

For more information, see Help and Support Center at 
As we had the "Allow HTML tags in Host / Service status enabled, I tried disabling it and it seems this solved the issue. This however means html tags are no longer recognized..

I guess w'll have to live with that. Or would there be some workaround I don't know of?

The ticket I created this morning can be closed however.

Sorry to Troy for wrongfully accusing him of things he had nothing to do with!!! :oops:

Grtz

Willem
Nagios XI 5.8.1
https://outsideit.net
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Problem with Open Service Problems

Post by tmcdonald »

Vague unhelpful answer of the day: I think the workaround in this case would be to alter the HTML in your output so that it does not split the table.

I am not sure exactly what character(s) is/are responsible, but the < and > tags might just need to be escaped. Maybe a PHP wrapper script around the plugin that calls htmlspecialchars()?
Former Nagios employee
Locked