Using HTML Tags In External Commands

Noah Leaman noah at mac.com
Thu Dec 18 07:25:53 CET 2003


I was just wondering if anyone had any insight on this issue. Does 
nagios just not support sending html output to the external commands? I 
could not find any mention of this sort of thing in the docs or the 
FAQ. I was really hoping I would be able to display the status of the 
router interfaces in the Status Information column in the web 
interface... but I'm running into the below problem.

On Wednesday, December 10, 2003, at 10:11  PM, Noah Leaman wrote:

> I'm a little puzzled...
>
> I'm sending external process_service_check_result commands that 
> contain a good amount of output text/html in them and I'm having a 
> problem where the output is getting truncated. This example copied 
> from nagios.log shows this happening:
>
> [1071121845] EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;orion;SNMP 
> Trap;1;ATM4/0/0.12-aal5 layer (10.0.1.5) status is CRITICAL - ATM PVC 
> to Site 1 (22M)<br>ATM4/0/0.13-aal5 layer (10.0.1.13) status is OK - 
> ATM PVC to Site 2 (22M)<br>GigabitEthernet1/0/0 (10.10.33.234) status 
> is OK - LAN Connection to VLAN 111<br>GigabitEthernet10/0/0 
> (10.10.36.50) status is OK - LAN Connection to VLAN 
> 222<br>GigabitEthernet2/0/0 (10.10.34.234) status is OK - LAN 
> connection to VLAN 333<br>GigabitEthernet9/0/0 (10.10.35.50) status is 
> OK - LAN Connection to VLAN 444<br>Loopback0 (10.1.40.10) status is OK 
> <br>
>
> [1071121855] SERVICE ALERT: orion;SNMP 
> Trap;WARNING;HARD;3;ATM4/0/0.12-aal5 layer (10.0.1.5) status is 
> CRITICAL - ATM PVC to Site 1 (22M)<br>ATM4/0/0.13-aal5 layer 
> (10.0.1.13) status is OK - ATM PVC to Site 2 
> (22M)<br>GigabitEthernet1/0/0 (10.10.33.234) status is OK - LAN 
> Connection to VLAN 111<br>GigabitEthernet10/0/0 (10.10.36.50) status 
> is OK - LAN Connection to VLAN 222<br>GigabitEthernet2/0/0 (10.10.3
>
> The EXTERNAL COMMAND log entry contains all the text but when it gets 
> displayed in the CGI, it's truncated as shown in the SERVICE ALERT log 
> entry. I cannot track it down to a specific number of characters nor 
> am I sending any odd control characters of any sort, but obviously 
> something is happening here...
>
> O.K., looking into it a little more, the <BR> tags are the culprit. 
> Sending the output with no <BR> tags I can send large amounts of 
> output, the question now is what the actual problem is with respect to 
> the HTML tags. I am only using <BR> to wrap each line so it's 
> readable. Should I be doing it another way? Is there a limitation on 
> what HTML can be in the output? I am already using <A HREF="..."></A> 
> tags that link to our ticketing system in the comments sections with 
> no problems yet (this is done with external commands too).
>
> Anyone have the same problem or have any advise on this?
>
> -- 
> Noah
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive?  Does it
> help you create better code?  SHARE THE LOVE, and help us help
> YOU!  Click Here: http://sourceforge.net/donate/
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when 
> reporting any issue. ::: Messages without supporting info will risk 
> being sent to /dev/null
>



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list