diff --git a/plugins/check_ups.c b/plugins/check_ups.c
index bbd963a91983ad180e7d78a8edbe5eeaa14e321d..c6964d89a7cd19bf7de72ee5d1dc0334b15eafc7 100644 (file)
--- a/plugins/check_ups.c
+++ b/plugins/check_ups.c
* 2004 Arnaud Quette <arnaud.quette@mgeups.com>
* Copyright (c) 2002-2007 Nagios Plugins Development Team
*
-* Last Modified: $Date$
-*
* Description:
*
* This file contains Network UPS Tools plugin for Nagios
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
-* $Id$
*
*****************************************************************************/
const char *progname = "check_ups";
-const char *revision = "$Revision$";
const char *copyright = "2000-2007";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
int len;
*buf=0;
-
+
/* create the command string to send to the UPS daemon */
/* Add LOGOUT to avoid read failure logs */
sprintf (send_buffer, "GET VAR %s %s\nLOGOUT\n", ups_name, varname);
if (len > logout_len && strcmp (ptr + len - logout_len, logout) == 0) len -= logout_len;
if (len > 0 && ptr[len-1] == '\n') ptr[len-1]=0;
if (strcmp (ptr, "ERR UNKNOWN-UPS") == 0) {
- printf (_("CRITICAL - no such ups '%s' on that host\n"), ups_name);
+ printf (_("CRITICAL - no such UPS '%s' on that host\n"), ups_name);
return ERROR;
}
}
-/* Command line: CHECK_UPS -H <host_address> -u ups [-p port] [-v variable]
+/* Command line: CHECK_UPS -H <host_address> -u ups [-p port] [-v variable]
[-wv warn_value] [-cv crit_value] [-to to_sec] */
usage2 (_("Invalid hostname/address"), optarg);
}
break;
- case 'T': /* FIXME: to be improved (ie "-T C" for Celsius or "-T F" for Farenheit) */
+ case 'T': /* FIXME: to be improved (ie "-T C" for Celsius or "-T F" for Farenheit) */
temp_output_c = 1;
break;
case 'u': /* ups name */
}
break;
case 'V': /* version */
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
exit (STATE_OK);
case 'h': /* help */
print_help ();
validate_arguments (void)
{
if (! ups_name) {
- printf ("%s\n", _("Error : no ups indicated"));
+ printf ("%s\n", _("Error : no UPS indicated"));
return ERROR;
}
return OK;
char *myport;
asprintf (&myport, "%d", PORT);
- print_revision (progname, revision);
+ print_revision (progname, NP_VERSION);
printf ("Copyright (c) 2000 Tom Shields\n");
printf ("Copyright (c) 2004 Alain Richard <alain.richard@equation.fr>\n");
printf (" %s\n", _("of that variable. If the remote host has multiple UPS that are being monitored"));
printf (" %s\n", _("you will have to use the --ups option to specify which UPS to check."));
printf ("\n");
- printf (" %s\n", _("This plugin requires that the UPSD daemon distributed with Russel Kroll's"));
+ printf (" %s\n", _("This plugin requires that the UPSD daemon distributed with Russell Kroll's"));
printf (" %s\n", _("Smart UPS Tools be installed on the remote host. If you do not have the"));
printf (" %s\n", _("package installed on your system, you can download it from"));
printf (" %s\n", _("http://www.networkupstools.org"));