This file is indexed.

/usr/share/munin/plugins/munin_update is in munin-node 1.4.6-3ubuntu3.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#!/bin/sh
# -*- sh -*-

: <<=cut

=head1 NAME

munin_update - Munin plugin to graph the time to query about each host from the nodes.

=head1 APPLICABLE SYSTEMS

Munin master servers.

=head1 CONFIGURATION

Normaly needs no configuration.  You may configure it with the
following parameter:

  [muin*]
      env.UPDATE_STATSFILE .../munin-update.stats
      env.MUNIN_UPDATE_LOCACTION .../munin-update

The first is the statistics file for munin update.

The exact location of this file is package/site specific, but
munin_update will know where it is unless you have made changes.

=head1 INTERPRETATION

The script reads the munin-update "stats" file to determine how long
it takes to query the nodes about each host configured in Munin.

Munin is run from cron every 5 minutes and before the next run of
munin-update the previous run needs to be done.  Each run of
munin-update forks one process pr. host that needs to get data
collected, so all collection runs in paralell.

Any host that is slow, for example slower than 4 miniutes, causes a
risk that the next run of munin-update must be cancled due to the
lateness of the previous run.  In such cases there will be single line
gaps in the "by day" graph.

Keep your hosts updating quickly and all will be well.

=head1 MAGIC MARKERS

  #%# family=manual
  #%# capabilities=autoconf

=head1 BUGS

Munin-update is always run at the same time as this plugin runs -
therefore the stats file may be incompletely written and the plugin
will likely show a incomplete list of hosts.  It should be using
munin-update.old-stats, which is not currently even made.

Munin-update removes the "domain" information on all hosts.  If there
are two hosts with the same host name in different domains then one of
them will be disappeared by the munin-update collection process.

=head1 VERSION

  $Id: munin_update.in 3585 2010-05-11 11:31:08Z feiner.tom $

=head1 AUTHOR

The munin_update plugin has been included in munin for many years (at
least 2004).  The most likely author is one of the original munin team.

Documentation and updating to 2009 for Munin 1.4 by Nicolai Langfeldt.

(C) 2004-2009 The Munin Team, Redpill Linpro AS

=head1 LICENSE

GPLv2

=cut

. $MUNIN_LIBDIR/plugins/plugin.sh

if [ -z "$UPDATE_STATSFILE" ]; then
    UPDATE_STATSFILE="$MUNIN_DBDIR/munin-update.stats"
fi

if [ -z "$MUNIN_UPDATE_LOCATION" ]; then
    MUNIN_UPDATE_LOCATION="$MUNIN_LIBDIR/munin-update";
fi

if [ "$1" = "autoconf" ]; then
	if [ -e "$MUNIN_UPDATE_LOCATION" ] ; then
	    echo "yes";
	else 
	    echo "no ($MUNIN_UPDATE_LOCATION is not present so this is not a munin-master)"
	fi
	exit 0
fi

if [ "$1" = "config" ]; then
	[ -f "$UPDATE_STATSFILE" ] || {
	    echo 'graph_title Plugin error'
	    echo "graph_info  Plugin cannot read stats file $UPDATE_STATSFILE"
	    echo 'error.label Error'
	    echo 'error.critical 1'
	    exit 0
	}

	echo 'graph_title Munin-update'
	echo 'graph_vlabel seconds'
	echo 'graph_category munin'
	echo 'graph_info This graph shows the time it takes to collect data from each hosts that munin collects data on. Munin-master is run from cron every 5 minutes and we want each of the munin-update runs to complete before the next one starts.  If munin-update uses too long time to run on one host run it with --debug to determine which plugin(s) are slow and solve the problem with them if possible.'
	sed '/^UD|/!d; s/.*;//; s/|/ /;' < $UPDATE_STATSFILE | 
	while read i j; do
            name="$(clean_fieldname "$i")"
	    echo "$name.label $i"
	    echo "$name.warning 240"
	    echo "$name.critical 285"
	done
	exit 0
fi

[ -f $UPDATE_STATSFILE ] || {
    echo 'error.value 1'
    echo "error.extinfo Plugin cannot read stats file $UPDATE_STATSFILE"
    exit 0
}

sed '/^UD|/!d; s/.*;//; s/|/ /;' < $UPDATE_STATSFILE | 
while read i j; do
        name="$(clean_fieldname "$i")"
	echo "$name.value $j"
done