Formatting LongOutput within Nagios XI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vappukuttan
Posts: 52
Joined: Tue Mar 05, 2019 7:43 am

Formatting LongOutput within Nagios XI

Post by vappukuttan »

Hello,

I am having an issue where the long output details get a little misalligned and makes it difficult to read once its displayed within NagiosXI ..
It trims all the blank spaces and since the font is different, it uses less space for a comma compared to a space or a specific letter, etc.

Is there anything to make the font of LongOutput use "Courier New" and keep the spaces within NagiosXI.. We use the ncpa-listener for checks.

Example:

Code: Select all

Line1 Test          Label1            Label2 
Line2 Text          ValueLabel1    ValueLabel2
Within Nagios XI Screen:

Code: Select all

Line1 Test Label1 Label2 
Line2 Text ValueLabel1 ValueLabel2

Thank you,
Vinod
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Formatting LongOutput within Nagios XI

Post by ssax »

You should be able to add this to a file called custom_xi.css:

Code: Select all

.servicestatusdetailinfotextlong { font-family: Courier New !important; }
Then upload it in Admin > Custom Includes, check the box next to it, and click the Save Changes button.

Then if you SHIFT+REFRESH or clear your browser cache it should pick that up and use it for that.

Another alternative would be using a monospace:

Code: Select all

.servicestatusdetailinfotextlong { font-family: monospace !important; }
vappukuttan
Posts: 52
Joined: Tue Mar 05, 2019 7:43 am

Re: Formatting LongOutput within Nagios XI

Post by vappukuttan »

Hello,

Thank you, that helped changed the font. it still seems like its trimming all the spaces and causes it to mis-align. I tried the monospace and it does the same.

Thank you,
Vinod
vappukuttan
Posts: 52
Joined: Tue Mar 05, 2019 7:43 am

Re: Formatting LongOutput within Nagios XI

Post by vappukuttan »

Hello,

I enabled the HTML tags on Host/Service status within Nagios XI Admin screen, I then used <pre> tags on the output. It looks promising, I am not sure if this solution will cause any other issues. @ssax please let me know if you think if this is the right approach.

Thank you,
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Formatting LongOutput within Nagios XI

Post by ssax »

That will work and was going to be what I was recommending next. It should not cause any other issues, I'd just double-check your notifications look how you want them as well.
vappukuttan
Posts: 52
Joined: Tue Mar 05, 2019 7:43 am

Re: Formatting LongOutput within Nagios XI

Post by vappukuttan »

Thank you for your help on this, appreciate it.

This topic can be closed
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Formatting LongOutput within Nagios XI

Post by ssax »

No problem, glad to help. Thank you for posting your resolution! Locking and marking as resolved.
Locked