Page 1 of 1

Formatting LongOutput within Nagios XI

Posted: Tue Nov 02, 2021 3:25 pm
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

Re: Formatting LongOutput within Nagios XI

Posted: Wed Nov 03, 2021 2:28 pm
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; }

Re: Formatting LongOutput within Nagios XI

Posted: Wed Nov 03, 2021 3:14 pm
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

Re: Formatting LongOutput within Nagios XI

Posted: Wed Nov 03, 2021 6:38 pm
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,

Re: Formatting LongOutput within Nagios XI

Posted: Thu Nov 04, 2021 4:21 pm
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.

Re: Formatting LongOutput within Nagios XI

Posted: Thu Nov 04, 2021 7:07 pm
by vappukuttan
Thank you for your help on this, appreciate it.

This topic can be closed

Re: Formatting LongOutput within Nagios XI

Posted: Fri Nov 05, 2021 2:08 pm
by ssax
No problem, glad to help. Thank you for posting your resolution! Locking and marking as resolved.