[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nagios-users
Subject:    Re: [Nagios-users] bacula plugin incorrect output
From:       Peter Wood <peterwood.sd () gmail ! com>
Date:       2013-06-25 20:34:17
Message-ID: CAB6PvH73F_Db8kQixAdBn_pNSnhSs0N5f4XLaknQmN8Fu_d_pg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Have you tried:
  command_line    $USER1$/check_bacula_lastbackup.pl -client $ARG1$

The way it is now you are running:
check_bacula_lastbackup.pl -H HOSTADDRESS -client cloud.mydomain.com



On Sun, Jun 23, 2013 at 10:51 AM, Tim Dunphy <bluethundr@gmail.com> wrote:

> Hey all,
> 
> I've tried adding a plugin from the exchange for bacula backups. The
> output is not quite right and I think my definitions may be off. I'd like
> to try for some advice.
> 
> This is the output:
> 
> Check Bacula Last Backup<http://nagios.jokefire.com/nagios/cgi-bin/extinfo.cgi?type=2&host=nagios&service=Check+Bacula+Last+Backup>
>  UNKNOWN 06-23-2013 13:45:490d 0h 4m 8s 3/3check_bacula_lastbackup.pl 1.0
> Nagios Plugin
> 
> My command definition is this:
> 
> # A command to check bacula last backup
> define command{
> command_name    check_bacula_last_backup
> command_line    $USER1$/check_bacula_lastbackup.pl -H HOSTADDRESS
> -client $ARG1$
> }
> 
> # Define a service to check last bacula backup on the  local machine.
> define service{
> use                             generic-service
> host_name                       nagios
> service_description             Check Bacula Last Backup
> contact_groups                  linux-admins
> check_command                   check_bacula_last_backup!
> cloud.mydomain.com
> notifications_enabled           1
> }
> 
> 
> If I run the check locally the output appears correct:
> 
> [root@cloud:~] #/usr/local/nagios/libexec/check_bacula_lastbackup.pl-client
> cloud.mydomain.com
> 
> OK: Last backup for cloud.mydomain.com was 10:43 hours ago.mydomain
> 
> 
> And these are the ownership/permissions on the script:
> 
> 
> [root@cloud:~] #ls -l /usr/local/nagios/libexec/check_bacula_lastbackup.pl
> 
> -rwxrwxr-x 1 nagios nagios 4335 Jun 23 12:32 /usr/local/nagios/libexec/
> check_bacula_lastbackup.pl
> 
> 
> It'd be great if I could get an opinion on this and much appreciated.
> 
> 
> Thanks
> 
> Tim
> 
> --
> GPG me!!
> 
> gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
> 
> 
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
> 
> Build for Windows Store.
> 
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Nagios-users mailing list
> Nagios-users@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
> 


[Attachment #5 (text/html)]

<div dir="ltr">Have you tried:<div><div \
style="font-family:arial,sans-serif;font-size:13px">  command_line    $USER1$/<a \
href="http://check_bacula_lastbackup.pl/" \
target="_blank">check_bacula_lastbackup.pl</a> -client $ARG1$</div> </div><div \
style="font-family:arial,sans-serif;font-size:13px"><br></div><div \
style="font-family:arial,sans-serif;font-size:13px">The way it is now you are \
running:</div><div style="font-family:arial,sans-serif;font-size:13px"> <a \
href="http://check_bacula_lastbackup.pl">check_bacula_lastbackup.pl</a> -H \
HOSTADDRESS -client <a \
href="http://cloud.mydomain.com">cloud.mydomain.com</a></div><div \
style="font-family:arial,sans-serif;font-size:13px"><br> </div></div><div \
class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jun 23, 2013 at 10:51 \
AM, Tim Dunphy <span dir="ltr">&lt;<a href="mailto:bluethundr@gmail.com" \
target="_blank">bluethundr@gmail.com</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Hey all,<div><br></div><div>I&#39;ve tried \
adding a plugin from the exchange for bacula backups. The output is not quite right \
and I think my definitions may be off. I&#39;d like to try for some advice.</div>

<div><br></div><div>This is the output:</div><div><br></div><div><table border="0" \
width="100%" style="border:none;margin:0px;font-size:9pt;padding:0px 0px \
10px;font-family:arial,verdana,serif"><tbody><tr><td style="border:none;padding:0px \
2px;font-size:8pt;background-color:rgb(255,221,170)">

<table border="0" width="100%" cellspacing="0" cellpadding="0" \
style="border:none;margin:0px"><tbody><tr><td align="left" \
style="border:none;padding:0px 2px"><table border="0" cellspacing="0" cellpadding="0" \
style="border:none;margin:0px">

<tbody><tr><td align="left" valign="center" style="border:none;padding:0px \
2px;font-size:8pt"><a \
href="http://nagios.jokefire.com/nagios/cgi-bin/extinfo.cgi?type=2&amp;host=nagios&amp;service=Check+Bacula+Last+Backup" \
style="text-decoration:none;color:rgb(44,55,99)" target="_blank">Check Bacula Last \
Backup</a></td>

</tr></tbody></table></td><td align="RIGHT" style="border:none;padding:0px \
2px;font-size:8pt"><table border="0" cellspacing="0" cellpadding="0" \
style="border:none;margin:0px"><tbody><tr></tr></tbody></table></td> \
</tr></tbody></table></td><td style="border:1px solid rgb(119,119,119);padding:0px \
5px;font-size:8pt;background-color:rgb(255,187,85)">UNKNOWN</td><td nowrap \
style="border:none;padding:0px 2px;font-size:8pt;background-color:rgb(255,221,170)">

06-23-2013 13:45:49</td><td nowrap style="border:none;padding:0px \
2px;font-size:8pt;background-color:rgb(255,221,170)">0d 0h 4m 8s</td><td \
style="border:none;padding:0px 2px;font-size:8pt;background-color:rgb(255,221,170)">

3/3</td><td valign="center" style="border:none;padding:0px \
2px;font-size:8pt;background-color:rgb(255,221,170)"><a \
href="http://check_bacula_lastbackup.pl" \
target="_blank">check_bacula_lastbackup.pl</a> 1.0 Nagios Plugin <br> </td>
</tr></tbody></table><div><br></div><div>My command definition is \
this:</div><div><br></div><div><div># A command to check bacula last \
backup</div><div>define command{</div><div>        command_name    \
check_bacula_last_backup</div>

<div>        command_line    $USER1$/<a href="http://check_bacula_lastbackup.pl" \
target="_blank">check_bacula_lastbackup.pl</a> -H HOSTADDRESS -client \
$ARG1$</div><div>        }</div><div><br></div><div><div># Define a service to check \
last bacula backup on the  local machine.</div>

<div>define service{</div><div>        use                             \
generic-service</div><div>        host_name                       nagios</div><div>   \
service_description             Check Bacula Last Backup</div>

<div>        contact_groups                  linux-admins</div><div>        \
check_command                   check_bacula_last_backup!<a \
href="http://cloud.mydomain.com" target="_blank">cloud.mydomain.com</a></div><div>    \
notifications_enabled           1</div>

<div>        }</div></div></div><div><br></div><div><br></div><div>If I run the check \
locally the output appears correct:</div><div><br></div><div><p \
style="margin:0px;font-size:12px;font-family:Helvetica"> [root@cloud:~] \
#/usr/local/nagios/libexec/<a href="http://check_bacula_lastbackup.pl" \
target="_blank">check_bacula_lastbackup.pl</a> -client <a \
href="http://cloud.mydomain.com" target="_blank">cloud.mydomain.com</a></p> <p \
style="margin:0px;font-size:12px;font-family:Helvetica">OK: Last backup for <a \
href="http://cloud.mydomain.com" target="_blank">cloud.mydomain.com</a> was 10:43 \
hours ago.mydomain</p><p style="margin:0px;font-size:12px;font-family:Helvetica">

<br></p><p style="margin:0px;font-size:12px;font-family:Helvetica">And these are the \
ownership/permissions on the script:</p><p \
style="margin:0px;font-size:12px;font-family:Helvetica"><br></p><p \
style="margin:0px;font-size:12px;font-family:Helvetica">

</p><p style="margin:0px">[root@cloud:~] #ls -l /usr/local/nagios/libexec/<a \
href="http://check_bacula_lastbackup.pl" \
target="_blank">check_bacula_lastbackup.pl</a></p><p style="margin:0px">-rwxrwxr-x 1 \
nagios nagios 4335 Jun 23 12:32 /usr/local/nagios/libexec/<a \
href="http://check_bacula_lastbackup.pl" \
target="_blank">check_bacula_lastbackup.pl</a></p>

<p style="margin:0px"><br></p><p style="margin:0px">It&#39;d be great if I could get \
an opinion on this and much appreciated. </p><p style="margin:0px"><br></p><p \
style="margin:0px">Thanks </p><span class="HOEnZb"><font color="#888888"><p \
style="margin:0px"> Tim</p>
<p></p></font></span></div><span class="HOEnZb"><font color="#888888">-- <br>GPG \
me!!<br><br>gpg --keyserver <a href="http://pool.sks-keyservers.net" \
target="_blank">pool.sks-keyservers.net</a> --recv-keys F186197B<br><br>

</font></span></div></div>
<br>------------------------------------------------------------------------------<br>
 This SF.net email is sponsored by Windows:<br>
<br>
Build for Windows Store.<br>
<br>
<a href="http://p.sf.net/sfu/windows-dev2dev" \
target="_blank">http://p.sf.net/sfu/windows-dev2dev</a><br>_______________________________________________<br>
 Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
 <a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" \
target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br> ::: \
Please include Nagios version, plugin version (-v) and OS when reporting any \
issue.<br> ::: Messages without supporting info will risk being sent to \
/dev/null<br></blockquote></div><br></div>



------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

_______________________________________________
Nagios-users mailing list
Nagios-users@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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic