mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix branding on poller-wrapper
This commit is contained in:
@@ -1,15 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
|
|
||||||
Observium configuration to JSON converter
|
Configuration to JSON converter
|
||||||
Written by Job Snijders <job.snijders@atrato.com)
|
Written by Job Snijders <job.snijders@atrato.com>
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$defaults_file = 'includes/defaults.inc.php';
|
$defaults_file = 'includes/defaults.inc.php';
|
||||||
$config_file = 'config.php';
|
$config_file = 'config.php';
|
||||||
|
|
||||||
// move to observium install dir
|
// move to install dir
|
||||||
chdir(dirname($argv[0]));
|
chdir(dirname($argv[0]));
|
||||||
|
|
||||||
function iscli() {
|
function iscli() {
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
#! /usr/bin/env python
|
#! /usr/bin/env python
|
||||||
"""
|
"""
|
||||||
poller-wrapper A small tool which wraps around the Observium poller
|
poller-wrapper A small tool which wraps around the poller and tries to
|
||||||
and tries to guide the polling process with a more modern
|
guide the polling process with a more modern approach with a
|
||||||
approach with a Queue and workers
|
Queue and workers
|
||||||
|
|
||||||
Author: Job Snijders <job.snijders@atrato.com>
|
Author: Job Snijders <job.snijders@atrato.com>
|
||||||
Date: Jan 2013
|
Date: Jan 2013
|
||||||
@@ -11,11 +11,6 @@
|
|||||||
that should run simultaneously. If no argument is given it will assume
|
that should run simultaneously. If no argument is given it will assume
|
||||||
a default of 16 threads.
|
a default of 16 threads.
|
||||||
|
|
||||||
In /etc/cron.d/observium replace this (or the equivalent) poller entry:
|
|
||||||
*/5 * * * * root /opt/observium/poller.php -h all >> /dev/null 2>&1
|
|
||||||
with something like this:
|
|
||||||
*/5 * * * * root python /opt/observium/poller-wrapper.py 16 >> /dev/null 2>&1
|
|
||||||
|
|
||||||
Read more: http://postman.memetic.org/pipermail/observium/2012-November/001303.html
|
Read more: http://postman.memetic.org/pipermail/observium/2012-November/001303.html
|
||||||
|
|
||||||
Ubuntu Linux: apt-get install python-mysqldb
|
Ubuntu Linux: apt-get install python-mysqldb
|
||||||
@@ -70,7 +65,7 @@ except IOError as e:
|
|||||||
try:
|
try:
|
||||||
config = json.loads(get_config_data())
|
config = json.loads(get_config_data())
|
||||||
except:
|
except:
|
||||||
print "ERROR: Could not load or parse observium configuration, are PATHs correct?"
|
print "ERROR: Could not load or parse configuration, are PATHs correct?"
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
|
|
||||||
poller_path = config['install_dir'] + '/poller.php'
|
poller_path = config['install_dir'] + '/poller.php'
|
||||||
|
Reference in New Issue
Block a user