From 1af146e39bc9cfc09f070de6bb134a68e8ba3ff4 Mon Sep 17 00:00:00 2001 From: Paul Gear Date: Tue, 26 Nov 2013 06:35:55 +1000 Subject: [PATCH] Fix branding on poller-wrapper --- config_to_json.php | 6 +++--- poller-wrapper.py | 13 ++++--------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/config_to_json.php b/config_to_json.php index 25e89dbed5..ae4a32d820 100644 --- a/config_to_json.php +++ b/config_to_json.php @@ -1,15 +1,15 @@ */ $defaults_file = 'includes/defaults.inc.php'; $config_file = 'config.php'; -// move to observium install dir +// move to install dir chdir(dirname($argv[0])); function iscli() { diff --git a/poller-wrapper.py b/poller-wrapper.py index c107d9ac19..9200e422cc 100644 --- a/poller-wrapper.py +++ b/poller-wrapper.py @@ -1,8 +1,8 @@ #! /usr/bin/env python """ - poller-wrapper A small tool which wraps around the Observium poller - and tries to guide the polling process with a more modern - approach with a Queue and workers + poller-wrapper A small tool which wraps around the poller and tries to + guide the polling process with a more modern approach with a + Queue and workers Author: Job Snijders Date: Jan 2013 @@ -11,11 +11,6 @@ that should run simultaneously. If no argument is given it will assume 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 Ubuntu Linux: apt-get install python-mysqldb @@ -70,7 +65,7 @@ except IOError as e: try: config = json.loads(get_config_data()) 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) poller_path = config['install_dir'] + '/poller.php'