Hi,
I have been unable to get the syslog function to work and I
can't find any info online that is helping I am just getting the follwoing msg
on the webpage
This device does not have any syslog entries.
Check that the syslog daemon and Observium
configuration options are set correctly, that this device is configured to send
syslog to Observium and that there are no firewalls blocking the messages.
See documentation and configuration options for
more information.
it may be something simple that I have missed (have followed
the documentation on the website ) see far below for my syslog-ng.conf, syslog.php
and config.php
So far I have tested and my server is receiving syslog msg
form my cisco devices I tested this by changing the destination d_observium to
output to a file rather than "program("/opt/observium/syslog.php" template
("$HOST||$FACILITY||$PRIORITY||$LEVEL||$TAG||$YEAR-$MONTH-$DAY
$HOUR:$MIN:$SEC||$MSG||$PROGRAM\n") template-escape(yes));
which worked beautifully any help would be appreciated.
---------------------config.php-------------------
<?php
## Have a look in includes/defaults.inc.php for
examples of settings you can set here. DO NOT EDIT defaults.inc.php!
// Database config
$config['db_host'] = "localhost";
$config['db_user'] = "root";
$config['db_pass'] = "7:5Rs-W1";
$config['db_name'] = "observium";
// Location
$config['install_dir'] =
"/opt/observium";
// Thie should *only* be set if you want to *force*
a particular hostname/port
// It will prevent the web interface being usable
form any other hostname
#$config['base_url']
= "http://observium.company.com";
// Default community list to use when adding/discovering
$config['snmp']['community'] =
array("public");
// Authentication Model
$config['auth_mechanism'] =
"mysql"; // default, other options: ldap,
http-auth, please see documentation for config help
// Enable alerter
//
$config['poller-wrapper']['alerter'] =
TRUE;
$config['enable_sla']
= 0; # Enable Cisco SLA collection and display
//frontpage map
$config['frontpage']['map']['region']
= "ZA";
$config['frontpage']['map']['resolution']
= "provinces";
$config['frontpage']['map']['dotsize']
= 5;
$config['frontpage']['map']['realworld']
= false;
$config['enable_syslog'] = 0;
$config['syslog_filter'] = array("last message
repeated", "Connection from UDP: [",
"ipSystemStatsTable node ipSystemStatsOutFragOKs not implemented",
"diskio.c: don't know how to handle"); ## Ignore some crappy
stuff from SNMP daemon
// End config.php
-----------------syslog.php-----------------------------
#!/usr/bin/env php
<?php
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage syslog
* @author Adam
Armstrong <adama@memetic.org>
* @copyright (C) 2006 - 2012 Adam
Armstrong
*
*/
include("includes/defaults.inc.php");
include("config.php");
include("includes/definitions.inc.php");
include("includes/syslog.php");
include("includes/dbFacile.php");
include("includes/common.php");
include("includes/functions.php");
$i = "1";
$s = fopen('php://stdin','r');
while ($line = fgets($s))
{
//logfile($line);
// host || facility || priority || level ||
tag || timestamp || msg || program
list($entry['host'],$entry['facility'],$entry['priority'], $entry['level'],
$entry['tag'], $entry['timestamp'], $entry['msg'], $entry['program']) =
explode("||", trim($line));
process_syslog($entry, 1);
unset($entry); unset($line);
$i++;
}
?>
-------------------------syslog-ng.conf-----------------------
@version: 3.3
@include "scl.conf"
options {
chain_hostnames(0);
keep_hostname(1);
use_dns(no);
};
########################
# Sources
########################
source s_net {
udp();
};
########################
# Destinations
########################
destination d_observium {
program("/opt/observium/syslog.php"
template ("$HOST||$FACILITY||$PRIORITY||$LEVEL||$TAG||$YEAR-$MONTH-$DAY
$HOUR:$MIN:$SEC||$MSG||$PROGRAM\n") template-escape(yes));};
########################
# Filters
########################
########################
# Log paths
########################
log { source(s_net); destination(d_observium); };
@include "/etc/syslog-ng/conf.d/"
Kind Regards,
![]() |
Glen Whittle | Solutions Architect | |||
| ||||
Tel: +27 31 538 4132 Fax: +27 31 538 4970 | ||||
Mobile: +27 81 394 2540 | www.interactivesa.co.za | ||||
| ||||
![]() |
![]() |
![]() |
![]() |
Disclaimer
The information contained
in this communication from the sender is confidential. It is intended solely for
use by the recipient and others authorized to receive it. If you are not the
recipient, you are hereby notified that any disclosure, copying, distribution or
taking action in relation of the contents of this information is strictly
prohibited and may be unlawful.