HTML Tags in Service History

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
optionstechnology
Posts: 234
Joined: Thu Nov 17, 2016 11:26 am

HTML Tags in Service History

Post by optionstechnology »

Hey Guys,

I use HTML tags to format my outputs with the "Allow HTML Tags in Host/Service Status" button ticked

However when I view service state history it does not format the HTML tags

Can you make it so that when the settings box is ticked it also formats the history correctly?

Thanks
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: HTML Tags in Service History

Post by pbroste »

Hello @optionstechnology

Thanks for reaching out, understand that you want to pass HTML and want to find out more specifics. Are you trying to pass a particular plugin, check results with HTML, or want to send along via email? Example:

Image

We will want to determine if the service check can render an HTML character set on output. If not requires editing to the script.

Thanks,
Perry
optionstechnology
Posts: 234
Joined: Thu Nov 17, 2016 11:26 am

Re: HTML Tags in Service History

Post by optionstechnology »

Hi,

I am trying to get the service history in nagios to properly treat html tags as html

The html works fine in the output of the check itself - shows up exactly as expected

However when I look at the history it does not format the html as html tags, I can see all of the correct characters there, it has no issue showing them, it simply does not treat them as html
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: HTML Tags in Service History

Post by pbroste »

Hello @optionstechnology

Thanks for the update, could you please share a screenshot of the service check output and the service history.

Please PM your updated system profile so we can see how things look from the backend.

To send us your system profile.
  • Login to the Nagios XI GUI using a web browser.
  • Click the "Admin" > "System Profile" Menu
  • Click the "Download Profile" button
  • Save the profile.zip file and send via Private Message
Thanks,
Perry
optionstechnology
Posts: 234
Joined: Thu Nov 17, 2016 11:26 am

Re: HTML Tags in Service History

Post by optionstechnology »

This is how the service looks in the front end-
htmlcodes.PNG
But if I view the history it looks like this-
htmlcodes2.PNG
You do not have the required permissions to view the files attached to this post.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: HTML Tags in Service History

Post by pbroste »

Hello @optionstechnology

Thanks for following up, went ahead and set up a test service check today on my VM to verify that HTML output functions. Want to have you run through a similar test to verify as well.

In my test I setup /usr/local/nagios/libexec/check_cpu_stats.sh with HTML output results.

Here is the example output that I am using:
echo "<br><u><font size=4><b>$label user=${CPU_USER}%<font color="green"> system=${CPU_SYSTEM}%</font> iowait=${CPU_IOWAIT}% idle=${CPU_IDLE}% | user=${CPU_USER2}% system=${CPU_SYSTEM2}% </font> iowait=${CPU_IOWAIT2}%;$WARNING_THRESHOLD;$CRITICAL_THRESHOLD idle=${CPU_IDLE2}%</b></u></h></br>"
exit $result
Here is the screenshot on the results.
cpustatshtml.png
Please verify that you have HTML tags enabled under Admin > System Settings > Allow HTML Rendering.

Please let me know how things are looking,
Perry
You do not have the required permissions to view the files attached to this post.
optionstechnology
Posts: 234
Joined: Thu Nov 17, 2016 11:26 am

Re: HTML Tags in Service History

Post by optionstechnology »

Can you show me a screenshot of the service history for that check?
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: HTML Tags in Service History

Post by pbroste »

Hello @optionstechnology

Thanks for following up, and here is the example screenshot:
serviceresults.png
Thanks,
Perry
You do not have the required permissions to view the files attached to this post.
optionstechnology
Posts: 234
Joined: Thu Nov 17, 2016 11:26 am

Re: HTML Tags in Service History

Post by optionstechnology »

SERVICE HISTORY

Not what its current showing, that works - but I want to see the history of what the service was showing

Click on that service, then click on this button-
servicehistory.png
You do not have the required permissions to view the files attached to this post.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: HTML Tags in Service History

Post by pbroste »

Hello @optionstechnology

Thanks for directing me to the correct page so we are on the same "page". You are correct that the 'service history' page that is referenced does not render 'html'. See the example that I ran through this morning:
servicehistory.png
I will run this past our engineers and then write up a feature request on this.

Thanks,
Perry
You do not have the required permissions to view the files attached to this post.
Locked