mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
additions to unix-agent. addition of basic munin-plugin support.
git-svn-id: http://www.observium.org/svn/observer/trunk@3088 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
5
scripts/agent-local/README
Normal file
5
scripts/agent-local/README
Normal file
@@ -0,0 +1,5 @@
|
||||
These are local plugin scripts for the Observium Unix Agent.
|
||||
|
||||
*DO NOT* put all of these files into your local folder, only use the scripts you want.
|
||||
|
||||
Make sure that you configure any scripts that require configuration. (MySQL!)
|
||||
@@ -14,7 +14,7 @@
|
||||
use LWP::Simple;
|
||||
|
||||
$CACHETIME = 30;
|
||||
$CACHEFILE = '/tmp/snmp-cache-apache';
|
||||
$CACHEFILE = '/tmp/observium-agent-apache';
|
||||
|
||||
# check for cache file newer CACHETIME seconds ago
|
||||
if ( -f $CACHEFILE && time - (stat( $CACHEFILE ))[9] < $CACHETIME) {
|
||||
|
||||
14
scripts/agent-local/munin
Executable file
14
scripts/agent-local/munin
Executable file
@@ -0,0 +1,14 @@
|
||||
# Lokale Einzelchecks
|
||||
if cd munin-scripts
|
||||
then
|
||||
for skript in $(ls)
|
||||
do
|
||||
if [ -x "$skript" ] ; then
|
||||
echo "<<<munin-$skript>>>"
|
||||
./$skript
|
||||
./$skript config
|
||||
fi
|
||||
done
|
||||
cd ..
|
||||
fi
|
||||
|
||||
@@ -49,7 +49,7 @@ $mysql_port = 3306;
|
||||
$mysql_ssl = FALSE; # Whether to use SSL to connect to MySQL.
|
||||
|
||||
$heartbeat = ''; # db.tbl in case you use mk-heartbeat from Maatkit.
|
||||
$cache_dir = '/tmp'; # If set, this uses caching to avoid multiple calls.
|
||||
$cache_dir = '/tmp'; # If set, this uses caching to avoid multiple calls.
|
||||
$cache_time = 30; # How long to cache data.
|
||||
|
||||
$chk_options = array (
|
||||
@@ -283,7 +283,7 @@ function ss_get_mysql_stats( $options ) {
|
||||
}
|
||||
|
||||
$sanitized_host = str_replace(array(":", "/"), array("", "_"), $host);
|
||||
$cache_file = "$cache_dir/mysql_stats.txt";
|
||||
$cache_file = "$cache_dir/observium-agent-mysql";
|
||||
debug("Cache file is $cache_file");
|
||||
|
||||
# First, check the cache.
|
||||
|
||||
Reference in New Issue
Block a user