mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00:00
[http_load_] Document running from cron with munin-run
When running from cron, nothing sets MUNIN_PLUGSTATE as needed. Runnig any of the http_load_ plugins through munin-run with the cron argument fixes the issue, otherwise the plugin cannot find its cache, and no data is output. While at it, we also rope-in MUNIN_DEDUG, so we can use --pidebug from munin-run. Signed-off-by: Olivier Mehani <shtrom@ssji.net>
This commit is contained in:
parent
7825fc9ed2
commit
ee72efe041
1 changed files with 10 additions and 5 deletions
|
@ -36,10 +36,12 @@
|
||||||
# $ echo "http://www.intrafish.no/" >> /etc/munin/urls.txt
|
# $ echo "http://www.intrafish.no/" >> /etc/munin/urls.txt
|
||||||
#
|
#
|
||||||
# 3. Add a cron job running the plugin with cron as the argument:
|
# 3. Add a cron job running the plugin with cron as the argument:
|
||||||
# */15 * * * * <user> /usr/share/munin/plugins/http_load_ cron
|
# */15 * * * * <user> /usr/sbin/munin-run http_load_<site>_loadtime cron
|
||||||
# <user> should be the user that has write permission to
|
# <user> should be the user that has write permission to the $cachedir
|
||||||
# the $cachedir directory set below. Set the intervals to
|
# directory set below. <site> should be any of the configured sites (all
|
||||||
# whatever you want.
|
# sites will get updated), likewise, you should replace loadtime by any
|
||||||
|
# metric that is enabled for that site (all metrics will get updated).
|
||||||
|
# Set the intervals to whatever you want.
|
||||||
#
|
#
|
||||||
# For verbose output (for debugging) you can do:
|
# For verbose output (for debugging) you can do:
|
||||||
# sudo -u <user> /usr/share/munin/plugins/http_load_ cron verbose
|
# sudo -u <user> /usr/share/munin/plugins/http_load_ cron verbose
|
||||||
|
@ -241,7 +243,10 @@ if($ARGV[0] and $ARGV[0] eq "autoconf") {
|
||||||
# read from
|
# read from
|
||||||
|
|
||||||
my $verbose=0;
|
my $verbose=0;
|
||||||
if($ARGV[1] and $ARGV[1] eq "verbose") {
|
if(
|
||||||
|
$ENV{MUNIN_DEBUG} eq "1" or
|
||||||
|
$ARGV[1] and $ARGV[1] eq "verbose"
|
||||||
|
) {
|
||||||
$verbose=1;
|
$verbose=1;
|
||||||
print "Verbose output\n";
|
print "Verbose output\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue