[Nagiosplug-devel] [ nagiosplug-Feature Requests-1671141 ] scaling for check_nt

SourceForge.net noreply at sourceforge.net
Wed Feb 28 20:00:25 CET 2007


Feature Requests item #1671141, was opened at 2007-02-28 19:00
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397600&aid=1671141&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Le Loup (le_loup)
Assigned to: Nobody/Anonymous (nobody)
Summary: scaling for check_nt

Initial Comment:
check_nt permits to access counters which may have inapproriate sizes. On nagios-portal.de someone asked how to access the system up time and produce a warning if it exceeds a certain value. The time is returned in seconds which is a bit difficult to handle for humans if you want to know the days. So I added two more optional parameters, a factor and a divisor. The changes were made on revision 1.46:

708c
        printf ("%s -H host -v variable [-p port] [-w warning] [-c critical] [-f factor] [-D divisor]",progname);
.
646a
  printf (" %s\n", "-f, --factor=INTEGER");
  printf ("   %s", _("Optional factor (default: "));
  printf ("%f)\n", factor);
  printf (" %s\n", "-D, --divisor=INTEGER");
  printf ("   %s", _("Optional divisor (default: "));
  printf ("%f)\n", divisor);
.
557a
                        case 'f': /* factor */
                                factor=atof(optarg);
                                break;
                        case 'D': /* divisor */
                                divisor=atof(optarg);
                                break;
.
487c
                c = getopt_long(argc,argv,"+hVH:t:c:w:p:v:l:s:d:f:D:",longopts,&option);
.
460a
                {"factor",   required_argument,0,'f'},
                {"divisor",  required_argument,0,'D'},
.
326a
                        counter_value *= factor;
                        counter_value /= divisor;
.
77a
double factor=1.0;
double divisor=1.0;
.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397600&aid=1671141&group_id=29880




More information about the Devel mailing list