summaryrefslogtreecommitdiffstats
path: root/plugins/check_ups.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_ups.c')
-rw-r--r--plugins/check_ups.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/check_ups.c b/plugins/check_ups.c
index 59dcc264..099881d0 100644
--- a/plugins/check_ups.c
+++ b/plugins/check_ups.c
@@ -1,16 +1,16 @@
1/***************************************************************************** 1/*****************************************************************************
2* 2*
3* Nagios check_ups plugin 3* Monitoring check_ups plugin
4* 4*
5* License: GPL 5* License: GPL
6* Copyright (c) 2000 Tom Shields 6* Copyright (c) 2000 Tom Shields
7* 2004 Alain Richard <alain.richard@equation.fr> 7* 2004 Alain Richard <alain.richard@equation.fr>
8* 2004 Arnaud Quette <arnaud.quette@mgeups.com> 8* 2004 Arnaud Quette <arnaud.quette@mgeups.com>
9* Copyright (c) 2002-2007 Nagios Plugins Development Team 9* Copyright (c) 2002-2007 Monitoring Plugins Development Team
10* 10*
11* Description: 11* Description:
12* 12*
13* This file contains Network UPS Tools plugin for Nagios 13* This file contains Network UPS Tools plugin for Monitoring
14* 14*
15* This plugin tests the UPS service on the specified host. Network UPS Tools 15* This plugin tests the UPS service on the specified host. Network UPS Tools
16* from www.networkupstools.org must be running for this plugin to work. 16* from www.networkupstools.org must be running for this plugin to work.
@@ -34,7 +34,7 @@
34 34
35const char *progname = "check_ups"; 35const char *progname = "check_ups";
36const char *copyright = "2000-2007"; 36const char *copyright = "2000-2007";
37const char *email = "nagiosplug-devel@lists.sourceforge.net"; 37const char *email = "devel@monitoring-plugins.org";
38 38
39#include "common.h" 39#include "common.h"
40#include "netutils.h" 40#include "netutils.h"
@@ -66,7 +66,7 @@ enum {
66#define UPSSTATUS_BOOST 512 66#define UPSSTATUS_BOOST 512
67#define UPSSTATUS_CHRG 1024 67#define UPSSTATUS_CHRG 1024
68#define UPSSTATUS_DISCHRG 2048 68#define UPSSTATUS_DISCHRG 2048
69#define UPSSTATUS_UNKOWN 4096 69#define UPSSTATUS_UNKNOWN 4096
70 70
71enum { NOSUCHVAR = ERROR-1 }; 71enum { NOSUCHVAR = ERROR-1 };
72 72
@@ -181,7 +181,7 @@ main (int argc, char **argv)
181 if (status & UPSSTATUS_DISCHRG) { 181 if (status & UPSSTATUS_DISCHRG) {
182 xasprintf (&ups_status, "%s%s", ups_status, _(", Discharging")); 182 xasprintf (&ups_status, "%s%s", ups_status, _(", Discharging"));
183 } 183 }
184 if (status & UPSSTATUS_UNKOWN) { 184 if (status & UPSSTATUS_UNKNOWN) {
185 xasprintf (&ups_status, "%s%s", ups_status, _(", Unknown")); 185 xasprintf (&ups_status, "%s%s", ups_status, _(", Unknown"));
186 } 186 }
187 } 187 }
@@ -379,7 +379,7 @@ determine_status (void)
379 else if (!strcmp (ptr, "DISCHRG")) 379 else if (!strcmp (ptr, "DISCHRG"))
380 status |= UPSSTATUS_DISCHRG; 380 status |= UPSSTATUS_DISCHRG;
381 else 381 else
382 status |= UPSSTATUS_UNKOWN; 382 status |= UPSSTATUS_UNKNOWN;
383 } 383 }
384 384
385 return OK; 385 return OK;
@@ -625,7 +625,7 @@ print_help (void)
625 625
626 printf (UT_WARN_CRIT); 626 printf (UT_WARN_CRIT);
627 627
628 printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT); 628 printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
629 629
630/* TODO: -v clashing with -v/-variable. Commenting out help text since verbose 630/* TODO: -v clashing with -v/-variable. Commenting out help text since verbose
631 is unused up to now */ 631 is unused up to now */