check_nwc_plugin interface-availability output html

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
liangwh
Posts: 23
Joined: Mon Mar 31, 2014 12:14 am

check_nwc_plugin interface-availability output html

Post by liangwh »

Hi ,
im using nagiosxi 5.2
I am trying to use

Code: Select all

check_nwc_health -H ip --community xxx --mode interface-availability
the output contains alot of html tag.
i have tried the solution from https://monitoring-portal.org/index.php ... ilability/ , which is to modify cgi.cfg.
i have modified(tried both value) and restarted the nagios, but still the same..
kindly assist..thanks! :oops:
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_nwc_plugin interface-availability output html

Post by rkennedy »

Can you show us the full input / output you're seeing when running the command over the CLI?

It may be a setting that can be switched on the Nagios side, or alternatively you may need to contact the original author depending where the issue lies.
Former Nagios Employee
liangwh
Posts: 23
Joined: Mon Mar 31, 2014 12:14 am

Re: check_nwc_plugin interface-availability output html

Post by liangwh »

rkennedy wrote:Can you show us the full input / output you're seeing when running the command over the CLI?

It may be a setting that can be switched on the Nagios side, or alternatively you may need to contact the original author depending where the issue lies.
Thanks for your reply, kindly refer to the attachment:
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: check_nwc_plugin interface-availability output html

Post by ssax »

Please go to Admin > System Settings
- Check the box next to Allow HTML Tags in Host/Service Status
- Click the Update Settings button

That should do what you're looking for.
liangwh
Posts: 23
Joined: Mon Mar 31, 2014 12:14 am

Re: check_nwc_plugin interface-availability output html

Post by liangwh »

ssax wrote:Please go to Admin > System Settings
- Check the box next to Allow HTML Tags in Host/Service Status
- Click the Update Settings button

That should do what you're looking for.
Hi ssax,
Thanks for your help, i already did the steps ..it works but there is still something missing.
if i were to download the output to a notepad and rename it to html, it can print all the network port from 1 to 300, however on nagiosxi, it only print port from 1 to 6..
is there anything i should look into?

Thankss
escape1.png
escape2.png
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_nwc_plugin interface-availability output html

Post by rkennedy »

liangwh wrote:
ssax wrote:Please go to Admin > System Settings
- Check the box next to Allow HTML Tags in Host/Service Status
- Click the Update Settings button

That should do what you're looking for.
Hi ssax,
Thanks for your help, i already did the steps ..it works but there is still something missing.
if i were to download the output to a notepad and rename it to html, it can print all the network port from 1 to 300, however on nagiosxi, it only print port from 1 to 6..
is there anything i should look into?

Thankss
escape1.png
escape2.png
Did you create your .html based off of the full result returned, or based off of cutting the HTML from the Nagios XI page? Just trying to understand if it's a rendering issue on XI side, or perhaps all of the output not being shown.

If the HTML is being truncated on the XI side, then this article will help you - https://support.nagios.com/kb/article.php?id=478
Former Nagios Employee
liangwh
Posts: 23
Joined: Mon Mar 31, 2014 12:14 am

Re: check_nwc_plugin interface-availability output html

Post by liangwh »

rkennedy wrote:
liangwh wrote:
ssax wrote:Please go to Admin > System Settings
- Check the box next to Allow HTML Tags in Host/Service Status
- Click the Update Settings button

That should do what you're looking for.
Hi ssax,
Thanks for your help, i already did the steps ..it works but there is still something missing.
if i were to download the output to a notepad and rename it to html, it can print all the network port from 1 to 300, however on nagiosxi, it only print port from 1 to 6..
is there anything i should look into?

Thankss
escape1.png
escape2.png
Did you create your .html based off of the full result returned, or based off of cutting the HTML from the Nagios XI page? Just trying to understand if it's a rendering issue on XI side, or perhaps all of the output not being shown.

If the HTML is being truncated on the XI side, then this article will help you - https://support.nagios.com/kb/article.php?id=478

Thanks for your reply.
I created the .html base on the full result return
The same full output on nagiosxi is truncated.
I have tried the link given..the result is still limited, i have restarted the nagios server as well...is there any command i can login to the mysql and verify manually?

thanks
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_nwc_plugin interface-availability output html

Post by rkennedy »

Hmm, did a new check run after you ran the command? Previous data will still be truncated, but new data should respect the 65000 char limit. Could you right click the inner frame, view source, and attach it here for us to look at? (from that service status page)

I'd like to see if it's actually showing all the HTML code here, or truncating at the result.
Former Nagios Employee
liangwh
Posts: 23
Joined: Mon Mar 31, 2014 12:14 am

Re: check_nwc_plugin interface-availability output html

Post by liangwh »

Hi ,
I did a force immediate check, and have the sercices check run since yesterday. now it is still limited.
I have attached the viewsource,kindly assist. Thanks alot

edit, reupload viewsource
You do not have the required permissions to view the files attached to this post.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: check_nwc_plugin interface-availability output html

Post by mcapra »

It looks like the html is being truncated for some reason. Hard to say exactly why since this plugin is very complex.

Can you alter your check_command definition in Nagios XI to include verbose output? I would be interested in seeing if the message is truncated in a similar position:

Code: Select all

check_nwc_health -H ip --community xxx --mode interface-availability -v
Former Nagios employee
https://www.mcapra.com/
Locked