Age | Commit message (Collapse) | Author | Files | Lines |
|
autoupdate tells me, that since C89 I can safely assume RETSIGTYPE
is void.
Therefore to simplify things I removed the corresponding configure.ac
line and replaced all mentions of RETSIGTYPE with void.
|
|
Centralise and refactor maxfd related functionality
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* lib/utils_base.c
* plugins/check_curl.c
* plugins-root/check_dhcp.c
Removed a line which theoretically can not do anything, but there was
comment which indicated something else. Still trying this though.
|
|
|
|
feature_check_disk_add_ignore_missing_option
|
|
Also added handling of name_prev in np_add_parameter and np_delete_parameter.
This make calling the np_delete_parameter function easier, because it requires
the previous element as second argument.
|
|
|
|
|
|
|
|
* fixes #1819
* mount entries also have to be accessible according to get_fs_usage()
|
|
when using check_snmp with multiple oids it simply printed the unparsed content
from -w/-c into the thresholds for each oid. So each oid contained the hole -w
from all oids.
./check_snmp ... -o iso.3.6.1.2.1.25.1.3.0,iso.3.6.1.2.1.25.1.5.0 -w '1,2' -c '3,4'
before:
SNMP ... | HOST-RESOURCES-MIB::hrSystemInitialLoadDevice.0=393216;1,2;3,4 HOST-RESOURCES-MIB::hrSystemNumUsers.0=24;1,2;3,4
after:
SNMP ... | HOST-RESOURCES-MIB::hrSystemInitialLoadDevice.0=393216;1;3 HOST-RESOURCES-MIB::hrSystemNumUsers.0=24;2;4
This also applies to fixed thresholds since check_snmp translates negative infinities from: '~:-1' to '@-1:~'
|
|
|
|
[check_disk] add support to display inodes usage in perfdata
|
|
When check_by_ssh runs into a timeout it simply exits keeping all child processes running.
Simply adopting the kill loop from runcmd_timeout_alarm_handler() fixes this.
Signed-off-by: Sven Nierlein <sven@nierlein.de>
|
|
This is not enabled by default
It can be enabled with the -P (--iperfdata) option
|
|
|
|
its good practice to use constants instead of (random) values.
Signed-off-by: Sven Nierlein <sven@nierlein.de>
|
|
|
|
This reverts commit a143739ed286cf9ae003792dbb1ce26ce43f3312.
Our current setup doesn't allow lib/*.c files to call functions defined
in plugins/utils.[ch].
|
|
---
Closes #1278
|
|
if asprintf fails, string content becomes invalid. we need
to check if it ran OK by checking the returned value.
in case of fail, asprintf returns -1, otherwise the number
of writen bytes is returned.
also, on ubuntu 13.10 i've receiving a lot of warnings:
"warning: ignoring return value of ‘asprintf’"
this patches fixes some of them
Signed-off-by: Ricardo Maraschini <ricardo.maraschini@gmail.com>
---
Closes #1227
|
|
As it is possible to use capabilities(7) on linux or solaris
privileges for example, it is not necessary in all cases to
have those binaries making use of setuid.
|
|
Coverity 66502 - File descriptor fd in cmd_file_read is never closed, and thus file is left open after usage throughout runtime. - SR
|
|
Add the UID of the invoking user to the state retention file path. This
helps solving permission issues when different users run the same
plugin.
|
|
Print a useful error message if opening the configuration file fails.
|
|
Read the configuration file with privileges temporarily dropped if the
code is used by a setuid plugin.
|
|
Our die() function doesn't append a newline character to the message.
|
|
Replace an "if" with the ternary operator.
|
|
Add two path names to the list of default INI file locations, as some
users/distributions prefer to put configuration files into
subdirectories.
|
|
We might want to spit out a warning when NAGIOS_CONFIG_PATH is used.
While at it, move the function that handles this environment variable to
the bottom.
|
|
|
|
|
|
Change the indentation and formatting of the code in lib/parse_ini.c.
This breaks patches against that file and makes it harder to track its
history, but it (hopefully) improves readability a lot.
|
|
There's no need to cast malloc(3)'s return value.
|
|
The lib/parse_ini.c:np_get_defaults() function now dies if no
configuration file is found.
|
|
Read $MP_CONFIG_FILE if that variable is set in the environment.
|
|
Read "monitoring-plugins.ini" if that file exists, but fall back to
reading "plugins.ini" or "nagios-plugins.ini" for backward
compatibility.
|
|
Rewrite the code that looks up the INI configuration file path (used by
the Extra-Opts feature) in order to improve readability. The behaviour
should not have changed.
|