mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-06-11 01:30:00 -04:00
parent
5a0ea60d76
commit
7c32e64540
1 changed files with 6 additions and 6 deletions
|
|
@ -136,18 +136,18 @@ main (int argc, char **argv)
|
|||
die (STATE_CRITICAL, "QUERY %s: Fetch row error - %s\n", _("CRITICAL"), error);
|
||||
}
|
||||
|
||||
/* free the result */
|
||||
mysql_free_result (res);
|
||||
|
||||
/* close the connection */
|
||||
mysql_close (&mysql);
|
||||
|
||||
if (! is_numeric(row[0])) {
|
||||
die (STATE_CRITICAL, "QUERY %s: %s - '%s'\n", _("CRITICAL"), _("Is not a numeric"), row[0]);
|
||||
}
|
||||
|
||||
value = strtod(row[0], NULL);
|
||||
|
||||
/* free the result */
|
||||
mysql_free_result (res);
|
||||
|
||||
/* close the connection */
|
||||
mysql_close (&mysql);
|
||||
|
||||
if (verbose >= 3)
|
||||
printf("mysql result: %f\n", value);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue