PM sent.lmiltchev wrote:We tested the same scenario on many different machines, but we were not able to recreate the issue. Let's try the following - generate the same report (as on screenshot), right-click on it, select "This Frame->Save Frame As...", and save the report (it will be saved as "Nagios Event Summary.htm"). PM me the report, so that we can review it and possibly debug the issue.
Most Recent Alerts Report Issue
Re: Most Recent Alerts Report Issue
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Most Recent Alerts Report Issue
Thank you, we will get back to you once we have reviewed the information and tried to reproduce the problem.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Most Recent Alerts Report Issue
It appears that the listing on 06-10-2013 07:07:45 is somehow injecting a <title> tag before the output. Is this check returning HTML?
Re: Most Recent Alerts Report Issue
I believe the check is looking for a line on a webpage with the text starting with <title> to verify that correct branding/title text is being displayed.
Am I right in assuming that you are stating that nagios is trying to display the html code from the return information for the check, instead of just treating it as string text to display? If so, is it possible to get nagios to assume that all return information is just string text and to not try to render it?
Thanks.
Am I right in assuming that you are stating that nagios is trying to display the html code from the return information for the check, instead of just treating it as string text to display? If so, is it possible to get nagios to assume that all return information is just string text and to not try to render it?
Thanks.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Most Recent Alerts Report Issue
The nagios.cfg has a field illegal_macro_output_chars that by default should contain
Which would strip these out.
Have you modified this?
Code: Select all
illegal_macro_output_chars=`~$&|'"<>Have you modified this?
Re: Most Recent Alerts Report Issue
Nope,
This line is still in the file, unmodified:
This line is still in the file, unmodified:
Code: Select all
# ILLEGAL MACRO OUTPUT CHARACTERS
# This option allows you to specify illegal characters that are
# stripped from macros before being used in notifications, event
# handlers, etc. This DOES NOT affect macros used in service or
# host check commands.
# The following macros are stripped of the characters you specify:
# $HOSTOUTPUT$
# $HOSTPERFDATA$
# $HOSTACKAUTHOR$
# $HOSTACKCOMMENT$
# $SERVICEOUTPUT$
# $SERVICEPERFDATA$
# $SERVICEACKAUTHOR$
# $SERVICEACKCOMMENT$
illegal_macro_output_chars=`~$&|'"<>
Re: Most Recent Alerts Report Issue
Check to make sure yo have enabled escaping of html tags in your cgi.cfg:
If it does not exist, or if it is set to '0', enable it by changing its value to '1' or if missing, by adding the line:
to the file /usr/local/nagios/etc/cgi.cfg
Don't forget to restart the nagios service after this change!
Code: Select all
grep escape_html /usr/local/nagios/etc/cgi.cfgCode: Select all
escape_html_tags=1Don't forget to restart the nagios service after this change!
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Most Recent Alerts Report Issue
It is already set:
Code: Select all
root@monitor:/usr/local/nagios/etc# grep escape_html /usr/local/nagios/etc/cgi.cfg
escape_html_tags=1Re: Most Recent Alerts Report Issue
This is very interesting as I could reproduce your problem with that directive set to '0'. I will see if I can get Scott to forward your pm to me so I can take a look as well . . .
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Most Recent Alerts Report Issue
Run the check from the cli and post the output. The html output in pm may be truncated.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.