Page 1 of 1

html output cut off with actions component

Posted: Fri Jul 29, 2016 6:22 am
by WillemDH
When I make an action in the action component that is executing my FireMotD https://github.com/willemdh/FireMotD with the html theme, somehow the html is cut off. I'm pretty sure this worked in the past.

This is the action command:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H %host% -c firemotd -a '--Theme Html'
The output is a blank page. Checking the source of the generated webpage show that the html partially got through:

Code: Select all

Running: <b>/usr/local/nagios/libexec/check_nrpe -H nagiosqa -c firemotd -a '--Theme Html'</b><BR><hr><pre><!doctype html><html lang="en">
<head>
    <title>FireMotD</title>
    <meta charset="utf-8">
    <meta name="description" content="Generates a HTML MotD message">
    <meta name="author" content="OutsideIT">
    <!-- <script src="js/scripts.js"></script> -->
    <style type="text/css">
        h1 {
            font-family: Verdana;
            font-weight: normal;
            color: #024457;
            font-weight: bold;
            padding-left:30px;
        }
        table a:link {
            color: #666;
            font-weight: bold;
            text-decoration:none;
        }
        table a:visited {
            color: #999999;
            font-weight:bold;
            text-decoration:none;
        }
        table a:active,
        table a:hover {
            color: #bd5a35;
            text-decoration:underline;
        }
        table {
            font-family:Arial, Helvetica, sans-serif;
            color:#666;
            font-size:12px;
            text-shadow: 1px 1px 0px #fff;
            ba
</pre><hr><div style='float: right;'><a href='#' onClick="window.location.reload()"><img src='https://nagiosserver/nagiosxi/images/reload.png' alt='Run Command Again' title='Run Command Again'></a> <a href='javascript:window.close();'>[Close]</a></div>
Is this a problem of FireMotD or in the actions component?

Grtz

Willem

Re: html output cut off with actions component

Posted: Fri Jul 29, 2016 9:18 am
by tmcdonald
What NRPE and check_nrpe versions are you using? There was a 1024-character limit for a long time that was fairly recently resolved, so that might be at play here.

Re: html output cut off with actions component

Posted: Thu Aug 11, 2016 8:51 am
by WillemDH
Trevor,

Code: Select all

/usr/local/nagios/libexec/check_nrpe -h

NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad ([email protected])
Version: 2.12
Last Modified: 03-10-2008
License: GPL v2 with exemptions (-l for more info)
Can I safely upgrade? Will NRPE be updated in a future XI update? Do I need to change anything hte client side? Can I downgrade again if something would come up?

Grtz

Willem

Re: html output cut off with actions component

Posted: Thu Aug 11, 2016 2:40 pm
by tgriep
To get the benefits of the larger payload when using NRPE, you would have to install the NRPE agent on the remote server and also update the check_nrpe plugin on the Nagios server.
Below is a link to the KB article upgrade procedure you can follow along to do that.
https://support.nagios.com/kb/article.php?id=520
This link talks about the compatibility of version 3 of NRPE.
https://support.nagios.com/kb/article.php?id=516

If you make a copy of the check_nrpe plugin on the Nagios server and reinstall the older version of the NRPE agent, that would be an easy way to go back if needed.

Re: html output cut off with actions component

Posted: Thu Aug 11, 2016 5:10 pm
by Box293
In this guide there is a specific section about installing the check_nrpe plugin only. It also shows you how to install it as /usr/local/nagios/libexec/check_nrpe_v3 which will prevent XI upgrades from touching it.

Then you would need to use different command definitions if you do that.

https://support.nagios.com/kb/article.php?id=515