Skip to content

Instantly share code, notes, and snippets.

@x1hash
Created August 27, 2015 07:27
Show Gist options
  • Save x1hash/a815d1c180fb26bb8f1c to your computer and use it in GitHub Desktop.
Save x1hash/a815d1c180fb26bb8f1c to your computer and use it in GitHub Desktop.
LibreNMS -> HipChat
<?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'] = "librenms";
$config['db_pass'] = "HIDDEN";
$config['db_name'] = "librenms";
$config['db']['extension'] = 'mysqli';// mysql or mysqli
### Memcached config - We use this to store realtime usage
$config['memcached']['enable'] = TRUE;
$config['memcached']['host'] = "localhost";
$config['memcached']['port'] = 11211;
### Locations - it is recommended to keep the default
#$config['install_dir'] = "/opt/librenms";
### This 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://librenms.company.com";
### Enable this to use rrdcached. Be sure rrd_dir is within the rrdcached dir
### and that your web server has permission to talk to rrdcached.
#$config['rrdcached'] = "unix:/var/run/rrdcached.sock";
### Default community
$config['snmp']['community'] = array("public");
### Authentication Model
$config['auth_mechanism'] = "mysql"; # default, other options: ldap, http-auth
#$config['http_auth_guest'] = "guest"; # remember to configure this user if you use http-auth
### List of RFC1918 networks to allow scanning-based discovery
#$config['nets'][] = "10.0.0.0/8";
#$config['nets'][] = "172.16.0.0/12";
#$config['nets'][] = "192.168.0.0/16";
# following is necessary for poller-wrapper
# poller-wrapper is released public domain
$config['poller-wrapper']['alerter'] = FALSE;
# Uncomment the next line to disable daily updates
#$config['update'] = 0;
# Uncomment to submit callback stats via proxy
#$config['callback_proxy'] = "hostname:port";
# fping location
$config['fping'] = "/usr/sbin/fping";
# Alerting
# Hipchat Integration
$config['alert']['transports']['hipchat'][] = array("url" => "https://api.hipchat.com/v1/rooms/message?auth_token=HIDDEN",
"room_id" => "HIDDEN",
"from" => "LibreNMS",
"color" => "red",
"notify" => 1,
"message_format" => "text");
# Email
$config['alert']['transports']['mail'] = true;
$config['email_backend'] = 'mail'; // Mail backend. Allowed: "mail" (PHP's built-in), "sendmail", "smtp".
$config['email_from'] = 'HIDDEN'; // Mail from. Default: "ProjectName" <projectid@`hostname`>
$config['email_user'] = $config['project_id'];
$config['email_sendmail_path'] = '/usr/sbin/sendmail'; // The location of the sendmail program.
$config['email_smtp_host'] = 'localhost'; // Outgoing SMTP server name.
$config['email_smtp_port'] = 25; // The port to connect.
$config['email_smtp_timeout'] = 10; // SMTP connection timeout in seconds.
$config['email_smtp_secure'] = NULL; // Enable encryption. Use 'tls' or 'ssl'
$config['email_smtp_auth'] = FALSE; // Whether or not to use SMTP authentication.
$config['email_smtp_username'] = NULL; // SMTP username.
$config['email_smtp_password'] = NULL; // Password for SMTP authentication.
$config['alert']['default_only'] = false; //Only issue to default_mail
$config['alert']['default_mail'] = ''; //Default email
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment