Configuration Options
Web Configuration
It's strongly recommended that you make configuration changes in the web-based configuration system where possible.
Configuration format
The config.php file is a piece of regular PHP code. This means you need to follow the syntax else neither the poller/discovery nor the web interface will work.
It's generally recommended to copy the example lines and edit to your requirements, making sure all your strings are quoted and your statements end in a semicolon ;
.
Example lines shown here usually contain the default value for the option, but may not if the default value has been changed.
Arrays
There sometimes seems to be some confusion about arrays.
PHP has 2 ways of setting an array variable:
$config['rancid_configs'] = array("/var/rancid/network1/configs",
"/var/rancid/network2/configs");
$config['rancid_configs'][] = "/var/rancid/network1/configs";
$config['rancid_configs'][] = "/var/rancid/network2/configs";
[]
just adds a new entry at the end of the array, whereas the first method replaces the entire array.
Don't mix them up, it won't work and you'll probably have arrays inside arrays.
Also note that if defaults.inc.php
defines something in an array using []
, copying the line into config.php
and changing the contents will result in an array with both the value from defaults.inc.php
and the one you set yourself.
$config['snmp']['community'][] = "mycomm";
Array
(
[0] => public
[1] => mycomm
)
If you don't want this, reinitialize the array:
$config['snmp']['community'] = array("mycomm");
If you want to drop one value from the array (ie you don't want to repeat the entire interfaces ignore list, but you want to remove one particular ignore), use the array_diff function:
$config['snmp']['community'] = array_diff( $config['snmp']['community'], array("public") );
Configuration directives
These are the available configuration options for Observium. They can be set in config.php
.
Installation Directories
$config['temp_dir'] = "/tmp";
$config['install_dir'] = "/opt/observium";
$config['html_dir'] = $config['install_dir'] . "/html";
$config['rrd_dir'] = $config['install_dir'] . "/rrd";
$config['log_dir'] = $config['install_dir'] . "/logs";
$config['nagplug_dir'] = '/usr/lib/nagios/plugins';
Location of Executables
$config['rrdtool'] = "/usr/bin/rrdtool";
$config['fping'] = "/usr/bin/fping";
$config['fping6'] = "/usr/bin/fping6";
$config['snmpwalk'] = "/usr/bin/snmpwalk";
$config['snmpget'] = "/usr/bin/snmpget";
$config['snmpgetnext'] = "/usr/bin/snmpgetnext";
$config['snmpbulkget'] = "/usr/bin/snmpbulkget";
$config['snmpbulkwalk'] = "/usr/bin/snmpbulkwalk";
$config['snmptranslate'] = "/usr/bin/snmptranslate";
$config['whois'] = "/usr/bin/whois";
$config['mtr'] = "/usr/bin/mtr";
$config['nmap'] = "/usr/bin/nmap";
$config['ipmitool'] = "/usr/bin/ipmitool";
$config['virsh'] = "/usr/bin/virsh";
$config['svn'] = "/usr/bin/svn";
$config['git'] = "/usr/bin/git"; // Used in show device config feature for git-enabled repos and rancid >= 3.2
$config['wmic'] = "/bin/wmic";
rrdcached Settings
$config['rrdcached'] = "unix:/var/run/rrdcached.sock";
rrdcached
socket. Can be a UNIX socket or a TCP socket. If this is left undefined rrdcached
won't be used.
Web Interface Settings
$config['base_url'] = "http://" . $_SERVER["SERVER_NAME"] .":".$_SERVER["SERVER_PORT"];
$config['web_url'] = "http://localhost:80/"
$config['base_url']
, but used ONLY in alerts for links. If not set autodetects by hostname.
$config['mono_font'] = "DejaVuSansMono";
$config['favicon'] = "images/observium-icon.png";
$config['page_refresh'] = "300"; ## Refresh the page every xx seconds
$config['front_page'] = "pages/front/default.php";
$config['page_title_prefix'] = "Observium :: ";
$config['timestamp_format'] = 'd-m-Y H:i:s';
$config['login_message'] = "Unauthorised access shall render the user liable to criminal and/or civil prosecution.";
$config['web_mouseover'] = TRUE;
$config['web_show_disabled'] = TRUE;
$config['web']['logo'] = "custom-logo.png";
html/images/
. Observium logo will move to the bottom bar. Images must be exactly 162x30px.
Sections
$config['int_customers'] = 1; # Enable Customer Port Parsing
$config['int_transit'] = 1; # Enable Transit Types
$config['int_peering'] = 1; # Enable Peering Types
$config['int_core'] = 1; # Enable Core Port Types
$config['int_l2tp'] = 0; # Enable L2TP Port Types
$config['show_locations'] = 1; # Enable Locations on menu
$config['ports_page_default'] = "details/"; ## eg "details/" "graphs/bits/"
$config['show_overview_tab'] = true;
$config['overview_show_sysDescr'] = true;
Device Traffic Graph
Filters
$config['device_traffic_iftype'] = array('/loopback/','/tunnel/','/virtual/','/mpls/');
$config['device_traffic_descr'] = array('/loopback/','/vlan/','/tunnel/','/:\d+/');
Authentication
$config['allow_unauth_graphs'] = 0; # Allow graphs to be viewed by anyone
$config['allow_unauth_graphs_cidr'] = array();
$config['auth_mechanism'] = "mysql"; # Available mechanisms: mysql (default), ldap, http-auth
External Integration
Rancid
$config['rancid_version'] = '2';
:
(by default) and ;
for rancid version >= 3
$config['rancid_configs'][] = '/var/lib/rancid/network/configs/';
$config['rancid_suffix'] = 'yourdomain.com';
$config['rancid_ignorecomments'] = 0; # Ignore lines starting with #
See here how to configure RANCID Integration.
CollectD
$config['collectd_dir'] = '/var/lib/collectd/rrd';
collectd.conf
as is used in Observium.
NfSen
$config['nfsen_enable'] = 0;
$config['nfsen_rrds'] = "/var/nfsen/profiles-stat/live/";
$config['nfsen_split_char'] = "_";
$config['nfsen_suffix'] = "_yourdomain_com";
SNMP Settings
$config['snmp']['timeout'] = 1;
$config['snmp']['retries'] = 5;
$config['snmp']['max-rep'] = FALSE;
-Cr
in snmpbulkwalk vastly increasing walk speed. Speeds up polling and discovery in most cases.
$config['snmp']['version'] = "v2c";
$config['snmp']['transports'] = array('udp', 'udp6', 'tcp', 'tcp6');
$config['snmp']['community'][] = "public";
$config['snmp']['v3'][0]['authlevel'] = "noAuthNoPriv"; // noAuthNoPriv | authNoPriv | authPriv
$config['snmp']['v3'][0]['authname'] = "observium"; // User Name (required even for noAuthNoPriv)
$config['snmp']['v3'][0]['authpass'] = ""; // Auth Passphrase
$config['snmp']['v3'][0]['authalgo'] = "MD5"; // MD5 | SHA
$config['snmp']['v3'][0]['cryptopass'] = ""; // Privacy (Encryption) Passphrase
$config['snmp']['v3'][0]['cryptoalgo'] = "AES"; // AES | DES
$config['snmp']['hide_auth'] = TRUE;
Ping Settings
$config['ping']['timeout'] = 500;
$config['ping']['retries'] = 3;
Define the number of retries and timeout for device pings. By default timeout set as 500ms (this is default in fping, see 'man fping') and use 3 retries.
$config['ping']['debug'] = TRUE;
HTTP Settings
$config['http_proxy'] = 'host:port';
Auto Discovery Settings
$config['mydomain'] = "domain.com";
$config['autodiscovery']['ip_nets'] = array("127.0.0.0/8", "192.168.0.0/16", "10.0.0.0/8", "172.16.0.0/12");
$config['autodiscovery']['xdp'] = TRUE; // Autodiscover hosts via discovery protocols
$config['autodiscovery']['ospf'] = TRUE; // Autodiscover hosts via OSPF
$config['autodiscovery']['bgp'] = TRUE; // Autodiscover hosts via iBGP
$config['autodiscovery']['libvirt'] = TRUE; // Autodiscover hosts found via libvirt
$config['autodiscovery']['snmp_scan'] = TRUE; // autodiscover hosts via SNMP scanning
$config['discover_services'] = false; ## Autodiscover services via SNMP on devices of type "server"
Alert Settings
Please note that this is currently only applicable to the Subscription Edition
$config['poller-wrapper']['alerter'] = TRUE;
$config['alerts']['interval'] = 86400;
$config['alerts']['bgp']['whitelist'] = NULL;
$config['uptime_warning'] = "84600";
Email backend settings
$config['email']['enable'] = TRUE;
$config['email']['from'] = NULL;
hostname -f
>
$config['email']['default'] = NULL;
$config['email']['default_only'] = FALSE;
$config['email']['backend'] = 'mail';
mail
(PHP's built-in), sendmail
, smtp
.
$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.
Debugging / Profiling Settings
$config['profile_sql'] = FALSE;
Store MySQL queries and performance data.
$config['snmp']['hide_auth'] = TRUE;
If TRUE hide SNMPv½ community and SNMPv3 auth from debug and web output
$config['ping']['debug'] = TRUE;
If TRUE store ping errors into logs/debug.log
file
$config['syslog']['debug'] = TRUE;
If TRUE store RAW syslog lines into logs/debug.log
file
$config['debug_port'][0] = TRUE;
List of port IDs for debug (each port ID as key). Debug info written to /tmp/port_debug_<ID>.txt
$config['debug_port']['spikes'] = FALSE;
Additional only ports spikes debug, written to /tmp/port_debug_spikes.txt
Cosmetics
$config['rrdgraph_def_text'] = "-c BACK#EEEEEE00 -c SHADEA#EEEEEE00 -c SHADEB#EEEEEE00 -c FONT#000000 -c CANVAS#FFFFFF";
$config['rrdgraph_def_text'] .= " -c GRID#a5a5a5 -c MGRID#FF9999 -c FRAME#5e5e5e -c ARROW#5e5e5e -R normal";
$config['rrdgraph_real_95th'] = FALSE;
$config['graph_colours']['mixed'] = array('CC0000','008C00','4096EE','73880A','D01F3C','36393D','FF0084');
$config['graph_colours']['greens'] = array('B6D14B','91B13C','6D912D','48721E','24520F','003300');
$config['graph_colours']['pinks'] = array('D0558F','B34773','943A57','792C38','5C1F1E','401F10');
$config['graph_colours']['blues'] = array('A0A0E5','8080BD','606096','40406F','202048','000033');
$config['graph_colours']['purples'] = array('CC7CCC','AF63AF','934A93','773177','5B185B','3F003F');
$config['graph_colours']['default'] =$config['graph_colours']['blues'];
Poller and Discovery Modules
$config['enable_bgp'] = 1; # Enable BGP session collection and display
Enable polling of BGP statistics via BGP4-MIB (and CISCO-BGP4-MIB / BGP4V2-MIB-JUNIPER)
$config['enable_syslog'] = 0; # Enable Syslog
Enable parsing of syslog.
$config['enable_inventory'] = 1; # Enable Inventory
Enable collection of inventory via ENTITY-MIB, HOST-RESOURCES-MIB and some vendor-specific MIBs.
$config['enable_pseudowires'] = 1; # Enable Pseudowires
Enable collection of pseudowire statistics on supported hardware
$config['enable_vrfs'] = 1; # Enable VRFs
Enable collection of VRF statistics on supported hardware
$config['enable_printers'] = 0; # Enable Printer support
Enable collection of printer (toner) statistics.
$config['enable_sla'] = 0; # Enable Cisco SLA collection and display
Enable collection of Cisco IP SLA data.
Interfaces
$config['port_descr_parser'] = "includes/port-descr-parser.inc.php"; # Parse port descriptions into fields
Define the port ifDescr parser. Custom parsers can be used to support alternate port labelling schemes.
$config['enable_ports_Xbcmc'] = 1; # Enable ifXEntry broadcast/multicast
Toggles the collection of separate broadcast/multicast statistics (alongside of standard nonunicast)
$config['enable_ports_etherlike'] = 0; # Enable Polling EtherLike-MIB (doubles interface processing time)
Toggles collection of EtherLike-MIB interface error statistics. This is heavy I/O performance hit as it virtually doubles RRD writing load per interface.
$config['enable_ports_junoseatmvp'] = 0; # Enable JunOSe ATM VC Discovery/Poller
Toggles collection and graphing of ATM VCs on Juniper JunOSe
$config['enable_ports_adsl'] = 1; # Enable ADSL-LINE-MIB
Toggles collection and graphing of ADSL statistics via ADSL-LINE-MIB
$config['debug_port'][0] = TRUE;
$config['debug_port']['spikes'] = FALSE;
See Debugging / Profiling Settings
Filters
$config['bad_if'][] = "voip-null";
$config['bad_if'][] = "virtual-";
$config['bad_if_regexp'][] = "/serial[0-9]:/";
Defines a list of interfaces to ignore based on regular expression. Interfaces are ignored if ifDescr matches the regular expression.
$config['bad_iftype'][] = "voiceEncap";
Defines a list of interfaces to ignore based on interface type. Interfaces are ignored if ifType matches this string (case-sensitive).
Processors
Filters
Defines a set of strings to filter processors:
$config['ignore_processor'][] = 'EXAMPLE';
If the processor description matches (case '''IN'''sensitive).
$config['ignore_processor_string'][] = 'EXAMPLE';
If the processor description contains string (case '''IN'''sensitive).
$config['ignore_processor_regexp'][] = '/^ExampleCPU$/';
If the processor description matches regex (case sensitive).
Mempools
Filters
Defines a set of strings to filter memory pools:
$config['ignore_mempool'][] = 'EXAMPLE';
If the memory description matches (case '''IN'''sensitive).
$config['ignore_mempool_string'][] = 'EXAMPLE';
If the memory description contains string (case '''IN'''sensitive).
$config['ignore_mempool_regexp'][] = '/ - (reserved|image)$/';
If the memory description matches regex (case sensitive).
Storage
Filters
$config['ignore_mount_removable'] = 1; # Ignore removable disk storage
$config['ignore_mount_network'] = 1; # Ignore network mounted storage
$config['ignore_mount_optical'] = 1; # Ignore mounted optical discs
$config['ignore_mount'][] = "/kern";
If the storage description (or mount point) matches (case '''IN'''sensitive).
$config['ignore_mount_string'][] = "packages";
If the storage description (or mount point) contains string (case '''IN'''sensitive).
$config['ignore_mount_regexp'][] = '/^(dev|proc)fs/';
If the storage description (or mount point) matches regex (case sensitive).
Printer toner
Filters
Defines a set of strings to filter printer toner:
$config['ignore_toner'][] = 'EXAMPLE';
If the toner description matches (case '''IN'''sensitive).
$config['ignore_toner_string'][] = 'EXAMPLE';
If the toner description contains string (case '''IN'''sensitive).
$config['ignore_toner_regexp'][] = '/^Fuchsia$/';
If the toner description matches regex (case sensitive).
Billing
$config['enable_billing'] = 0; # Enable Billing
$config['billing']['customer_autoadd'] = 0; # Enable Auto-add bill per customer
$config['billing']['circuit_autoadd'] = 0; # Enable Auto-add bill per circuit_id
$config['billing']['bill_autoadd'] = 0; # Enable Auto-add bill per bill_id
Syslog Settings
$config['enable_syslog'] = 1;
Enable syslog globally.
$config['syslog']['filter'][] = 'last message repeated';
$config['syslog']['filter'][] = 'Connection from UDP: [';
Filter syslog entries with this strings.
Note, need reload Rsyslog or Syslog-ng syslog service after change filters!
$config['syslog']['fifo'] = FALSE;
Take input from FIFO
$config['syslog']['debug'] = TRUE;
See Debugging / Profiling Settings
$config['syslog']['host_map']['original.hostname.com'] = 'host.company.com';
$config['syslog']['host_map']['original.hostname.com'] = 78;
Allows the mapping of DNS PTRs to a specific hostname or device_id in Observium. The examples above would match all syslog entries from original.hostname.com to either the device in Observium with the hostname of host.company.com or the device with the device_id of 78. We recommend using hostname rewrites instead of device_id rewrites because of flexibility.
Virtualization
$config['enable_libvirt'] = 0; # Enable Libvirt VM support
Enable collection of Libvirt virtual machines on Linux machines.
$config['libvirt_protocols'] = array("qemu+ssh","xen+ssh");
Use these protocols to discover virtual machines. If one fails, the code will try the next one, so put the one most likely to work in front. Once VMs are found, the remaining protocols are not tried.
Unix Agent
$config['unix-agent']['port'] = 36602;
Sets the default port the Observium Unix Agent is running at on the remote machines.
Misc Settings
$config['astext'][65332] = "Cymru FullBogon Feed";
$config['astext'][65333] = "Cymru Bogon Feed";
This allows you to set a custom text for an ASN, in case it is not to your liking (i.e. you prefer ''UUnet'' to ''Verizon'') or it simply does not exist in whois (Private ASN).
sysLocation Configuration
$config['location_map']['Under the Sink'] = "Under The Sink, The Office, London, UK";
Location Mapping, use this feature to map ugly locations to pretty locations. In this example, if any device location equals 'Under the Sink'
than it rewrites in DB to 'Under The Sink, The Office, London, UK'
. Also you can rewrite sysLocation for specific device in device edit tab over web ui.
Geocoding Configuration
$config['geocoding']['enable'] = TRUE; // Enable Geocoding
Enable or disable geocoding of addresses. If disabled, best to disable the map on the front page as well.
$config['geocoding']['dns'] = FALSE;
Try to use DNS LOC records for detect device coordinates (disabled by default). For more information please see the Wikipedia entry LOC Record and then Create DNS LOC record.
$config['geocoding']['api'] = 'yahoo';
Which API to use to resolve your addresses into coordinates. We currently support mapquest
, google
, yandex
, yahoo
and openstreetmap
. The google
API is the most accurate, but requires a license from Google to use.
$config['geocoding']['default']['lat'] = "37.7463058"; // Default latitude
$config['geocoding']['default']['lon'] = "-25.6668573"; // Default longitude
These two settings define the default coordinates for a device for which we can't find valid coordinates via any other means. The default coordinates are the Canary Islands in the Atlantic Ocean.
$config['location_menu_geocoded'] = TRUE; // Build location menu with geocoded data.
Set to FALSE if you want to use the regular location menu, simply listing your configured locations. Useful if you don't have mappable addresses in your devices. Automatically disabled if you completely disable geocoding.
Reverse Geocoding
If you set correct DNS LOC records for device or device sysLocation string have coordinates in format [33.234, -56.22]
, than used reverse geocoding. Try detect Country, City, etc by coordinates. But observium anyway will store in DB specified coordinates.
Example for sysLocation with coordinates:
Some location [33.234, -56.22]
Some location (33.234 -56.22)
Some location [33.234;-56.22]
33.234,-56.22
Also you can set manual device coordinates in device edit tab.
Frontpage Settings
Deprecated
The front page has been deprecated in releases after November 2018. Most options here are no longer functional.
General settings
$config['frontpage']['eventlog']['items'] = 15; // Only show the last XX items of the eventlog view
$config['frontpage']['syslog']['items'] = 25; // Only show the last XX items of the syslog view
Map overview settings
Please Note
This globe overview uses the Leaflet Javascript library to generate the map based on the sysLocation of the devices. So you need correct address information for the map to work correctly. Also note that if you have many devices it can take a long time to generate the map overview.
$config['location_map']['Under the Sink'] = "Under The Sink, The Office, London, UK";
Use this to map your "simple" locations to fully qualified locations to be used in positioning on the map.
Device Status
$config['frontpage']['device_status']['devices'] = true; // Show the down devices
$config['frontpage']['device_status']['ports'] = true; // Show the down ports
$config['frontpage']['device_status']['errors'] = true; // Show the ports with interface errors
$config['frontpage']['device_status']['services'] = false; // Show the down services
$config['frontpage']['device_status']['bgp'] = true; // Show the bgp status
$config['frontpage']['device_status']['uptime'] = true; // Show the uptime status
Custom Traffic Graphs
$config['frontpage']['custom_traffic']['ids'] = ""; // COMMA SEPERATED PORT ID FOR EXAMPLE: "1,2,3,4,5"
$config['frontpage']['custom_traffic']['title'] = ""; // Your own title for the custom traffic graphs
In order to find out the ID of a port follow these simple steps:
- Goto "Ports" > "All Ports" from the menu
- Once you see the ports list, select the port you want and click on it (not the device name, but the port name [second colum])
- Now you should have an url that looks like
http://myobserviumserver/device/device=9/tab=port/port=102/
- The port ID in this case is the number
102
All port IDs are unique, so it doesn't matter if the ports are on the same device or not.
Custom Mini Graphs
$config['frontpage']['minigraphs']['ids'] = "2,device_processor,CPU Usage;10,diskio_bits,IOPS";
A semi-colon separated list of graphs described as "entity_id, graph_type, description"
$config['frontpage']['minigraphs']['legend'] = false;
Enable/Disable the legend on custom mini graph view
In order to find out the ID and type of a graph follow these simple steps:
- Goto "Devices" > "All Devices" from the menu
- Once you see the device list, select the device you want and click on it
- Now select the tab you want
- Select the graph you want to be displayed on the frontpage as a minigraph and click on it
- Now you should have an url that looks like
http://myobserviumserver/graphs/id=4/type=diskio_bits/to=1359767418/from=1359162618/
orhttp://myobserviumserver/graphs/id=1/type=mempool_usage/to=1359767959/from=1359681559/
- In this case the ID in the first example is the number
4
and the type isdiskio_bits
and in the second example the ID is the number1
and the type ismempool_usage
- The configuration variable would look like this:
4,diskio_bits;1,mempool_usage
The graphs are shown in the order of the configuration variable so you can order them this way from left to right.
Frontpage Module Order
$config['frontpage']['order'] = array('map', 'device_status', 'overall_traffic', 'syslog', 'eventlog');
This option defines an array of modules which should be rendered on to the front page. Options include:
map
alert_table
status_summary
device_status
device_status_boxes
overall_traffic
custom_traffic
minigraphs
syslog
eventlog
Housekeeping Settings
More details are available on the Housekeeping page.
Cleans up syslog data, based on the age of the entries.
$config['housekeeping']['syslog']['age'] = 0;
Cleans up eventlog data, based on the age of the entries.
$config['housekeeping']['eventlog']['age'] = 0;
Cleanup of RRD files with a modification time of a certain age. Ports that are gone, sensors that are gone, erroneously created RRD files due to bugs or hardware changes, etc.
$config['housekeeping']['rrd']['age'] = 0;
Cleanup of invalid RRD files. Requires $config['file']
to be set correctly to the path of the file
magic utility. Runs over all .rrd files to see if they are identified as rrdtool Databases. They can sometimes get corrupted (0 bytes, half a file) when your disk/ramdrive is full. When they exist, they are not recreated even if they're invalid. Consequently rrdtool refuses to add data into them as they are not valid RRD database files. This scripts deletes any .rrd file not identified as an rrdtool file.
$config['housekeeping']['rrd']['invalid'] = TRUE;
Note: this defaults to true currently. Handle with care.
Cleans up deleted ports. You can do this manually by using the purge button in the web interface, but one could probably safely assume if a port has not returned after 30 days it really is gone. Shorter could be useful in your environment, mine is set to 7 days.
$config['housekeeping']['deleted_ports']['age'] = 0;
Cleans up perf time information. Observium keeps performance times per module, per device and per run. This quickly accumulates into a giant number of rows in the database.
$config['housekeeping']['timing']['age'] = 0;