mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
# -> / for phpdoc
git-svn-id: http://www.observium.org/svn/observer/trunk@3239 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
+21
-21
@@ -1,34 +1,34 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
########################################################################################
|
||||
##
|
||||
## A small script to grab the MailScanner statistics from a MailScanner server
|
||||
## Needed commands: php, MailScanner, WatchMailLog, perl
|
||||
##
|
||||
## Install:
|
||||
## Add the WatchMailLog Daemon to the rc.local so its start on server boot
|
||||
## Run the WatchMailLog Daemon to start grabbing statistics from log files
|
||||
## Add the following to your snmpd.conf file:
|
||||
## extend mailwatch /opt/observium/scripts/mailwatch.php
|
||||
##
|
||||
## Version 1.0 By:
|
||||
## All In One - Dennis de Houx <info@all-in-one.be>
|
||||
##
|
||||
########################################################################################
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
///
|
||||
/// A small script to grab the MailScanner statistics from a MailScanner server
|
||||
/// Needed commands: php, MailScanner, WatchMailLog, perl
|
||||
///
|
||||
/// Install:
|
||||
/// Add the WatchMailLog Daemon to the rc.local so its start on server boot
|
||||
/// Run the WatchMailLog Daemon to start grabbing statistics from log files
|
||||
/// Add the following to your snmpd.conf file:
|
||||
/// extend mailwatch /opt/observium/scripts/mailwatch.php
|
||||
///
|
||||
/// Version 1.0 By:
|
||||
/// All In One - Dennis de Houx <info@all-in-one.be>
|
||||
///
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#### START SETTINGS ####
|
||||
/// START SETTINGS ///
|
||||
|
||||
$mailstats = "/opt/observium/scripts/watchmaillog/watchmaillog_counters";
|
||||
|
||||
#### END SETTINGS ####
|
||||
/// END SETTINGS ///
|
||||
|
||||
|
||||
##
|
||||
## DO NOT EDIT BENETH THIS LINE
|
||||
##
|
||||
########################################################################################
|
||||
///
|
||||
/// DO NOT EDIT BENETH THIS LINE
|
||||
///
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function doSNMPv2($vars) {
|
||||
$stats = array();
|
||||
|
||||
+19
-19
@@ -1,35 +1,35 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
########################################################################################
|
||||
##
|
||||
## A small script to grab the NTP Client statistics from a NTPD server
|
||||
## Needed commands: php, ntpd, ntpq
|
||||
##
|
||||
## Install:
|
||||
## Add the following to your snmpd.conf file:
|
||||
## extend ntpclient /opt/observium/scripts/ntp-client.php
|
||||
##
|
||||
## Version 1.1 By:
|
||||
## All In One - Dennis de Houx <info@all-in-one.be>
|
||||
##
|
||||
########################################################################################
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
///
|
||||
/// A small script to grab the NTP Client statistics from a NTPD server
|
||||
/// Needed commands: php, ntpd, ntpq
|
||||
///
|
||||
/// Install:
|
||||
/// Add the following to your snmpd.conf file:
|
||||
/// extend ntpclient /opt/observium/scripts/ntp-client.php
|
||||
///
|
||||
/// Version 1.1 By:
|
||||
/// All In One - Dennis de Houx <info@all-in-one.be>
|
||||
///
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#### START SETTINGS ####
|
||||
/// START SETTINGS ///
|
||||
|
||||
$ntpq = "/usr/sbin/ntpq";
|
||||
|
||||
# Change this to true if you have clk_jitter, sys_jitter in the ntpq -c rv output
|
||||
$newstats_style = false;
|
||||
|
||||
#### END SETTINGS ####
|
||||
/// END SETTINGS ///
|
||||
|
||||
|
||||
##
|
||||
## DO NOT EDIT BENETH THIS LINE
|
||||
##
|
||||
########################################################################################
|
||||
///
|
||||
/// DO NOT EDIT BENETH THIS LINE
|
||||
///
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
$cmd = shell_exec($ntpq." -c rv | grep '^offset'");
|
||||
if ($newstats_style) {
|
||||
|
||||
+19
-19
@@ -1,22 +1,22 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
########################################################################################
|
||||
##
|
||||
## A small script to grab the NTPD Server statistics from a NTPD server
|
||||
## Needed commands: php, ntpd, ntpq, ntpdc
|
||||
##
|
||||
## Install:
|
||||
## Add the following to your snmpd.conf file:
|
||||
## extend ntpdserver /opt/observium/scripts/ntpd-server.php
|
||||
##
|
||||
## Version 1.1 By:
|
||||
## All In One - Dennis de Houx <info@all-in-one.be>
|
||||
##
|
||||
########################################################################################
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
///
|
||||
/// A small script to grab the NTPD Server statistics from a NTPD server
|
||||
/// Needed commands: php, ntpd, ntpq, ntpdc
|
||||
///
|
||||
/// Install:
|
||||
/// Add the following to your snmpd.conf file:
|
||||
/// extend ntpdserver /opt/observium/scripts/ntpd-server.php
|
||||
///
|
||||
/// Version 1.1 By:
|
||||
/// All In One - Dennis de Houx <info@all-in-one.be>
|
||||
///
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#### START SETTINGS ####
|
||||
/// START SETTINGS ///
|
||||
|
||||
$ntpq = "/usr/sbin/ntpq";
|
||||
$ntpdc = "/usr/sbin/ntpdc";
|
||||
@@ -24,13 +24,13 @@
|
||||
# Change this to true if you have clk_jitter, sys_jitter in the ntpq -c rv output
|
||||
$newstats_style = false;
|
||||
|
||||
#### END SETTINGS ####
|
||||
/// END SETTINGS ///
|
||||
|
||||
|
||||
##
|
||||
## DO NOT EDIT BENETH THIS LINE
|
||||
##
|
||||
########################################################################################
|
||||
///
|
||||
/// DO NOT EDIT BENETH THIS LINE
|
||||
///
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
$cmd = shell_exec($ntpq." -c rv");
|
||||
$cmd2 = shell_exec($ntpdc." -c iostats");
|
||||
|
||||
+19
-19
@@ -1,32 +1,32 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
########################################################################################
|
||||
##
|
||||
## A small script to grab the DNS statistics from a PowerDNS server
|
||||
## Needed commands: php, pdns_control
|
||||
##
|
||||
## Install:
|
||||
## Add the following to your snmpd.conf file:
|
||||
## extend powerdns /opt/observium/scripts/powerdns.php
|
||||
##
|
||||
## Version 1.0 By:
|
||||
## All In One - Dennis de Houx <info@all-in-one.be>
|
||||
##
|
||||
########################################################################################
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
///
|
||||
/// A small script to grab the DNS statistics from a PowerDNS server
|
||||
/// Needed commands: php, pdns_control
|
||||
///
|
||||
/// Install:
|
||||
/// Add the following to your snmpd.conf file:
|
||||
/// extend powerdns /opt/observium/scripts/powerdns.php
|
||||
///
|
||||
/// Version 1.0 By:
|
||||
/// All In One - Dennis de Houx <info@all-in-one.be>
|
||||
///
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#### START SETTINGS ####
|
||||
/// START SETTINGS ///
|
||||
|
||||
$pdnscontrol = "/usr/bin/pdns_control";
|
||||
|
||||
#### END SETTINGS ####
|
||||
/// END SETTINGS ///
|
||||
|
||||
|
||||
##
|
||||
## DO NOT EDIT BENETH THIS LINE
|
||||
##
|
||||
########################################################################################
|
||||
///
|
||||
/// DO NOT EDIT BENETH THIS LINE
|
||||
///
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
$cmd = shell_exec($pdnscontrol." show \*");
|
||||
$vars = array();
|
||||
|
||||
+22
-22
@@ -1,36 +1,36 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
########################################################################################
|
||||
##
|
||||
## A small script to grab the realtime statistics from a ShoutCast server
|
||||
## Needed commands: php
|
||||
##
|
||||
## Install:
|
||||
## Edit the shoutcast.conf file
|
||||
## Add a crontab (every 5 min) for:
|
||||
## /opt/observium/scripts/shoutcast.php makeCache
|
||||
## Add the following to your snmpd.conf file:
|
||||
## extend shoutcast /opt/observium/scripts/shoutcast.php
|
||||
##
|
||||
## Version 1.1 By:
|
||||
## All In One - Dennis de Houx <info@all-in-one.be>
|
||||
##
|
||||
########################################################################################
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
///
|
||||
/// A small script to grab the realtime statistics from a ShoutCast server
|
||||
/// Needed commands: php
|
||||
///
|
||||
/// Install:
|
||||
/// Edit the shoutcast.conf file
|
||||
/// Add a crontab (every 5 min) for:
|
||||
/// /opt/observium/scripts/shoutcast.php makeCache
|
||||
/// Add the following to your snmpd.conf file:
|
||||
/// extend shoutcast /opt/observium/scripts/shoutcast.php
|
||||
///
|
||||
/// Version 1.1 By:
|
||||
/// All In One - Dennis de Houx <info@all-in-one.be>
|
||||
///
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#### START SETTINGS ####
|
||||
/// START SETTINGS ///
|
||||
|
||||
$config = "/opt/observium/scripts/shoutcast.conf";
|
||||
$cache = "/opt/observium/scripts/shoutcast.cache";
|
||||
|
||||
#### END SETTINGS ####
|
||||
/// END SETTINGS ///
|
||||
|
||||
|
||||
##
|
||||
## DO NOT EDIT BENETH THIS LINE
|
||||
##
|
||||
########################################################################################
|
||||
///
|
||||
/// DO NOT EDIT BENETH THIS LINE
|
||||
///
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/* Do NOT run this script through a web browser */
|
||||
if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD']) || isset($_SERVER['REMOTE_ADDR'])) {
|
||||
|
||||
@@ -15,7 +15,7 @@ if ($fd = @fopen($argv[1],'r'))
|
||||
foreach (explode("\n", $data) as $line)
|
||||
{
|
||||
$update = mysql_query($line);
|
||||
# FIXME check query success?
|
||||
/// FIXME check query success?
|
||||
echo("$line \n");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user