Merge pull request #353 from sbadia/markdown-flavored

Use markdown syntax on agent and billing documentation
This commit is contained in:
Neil Lathwood
2014-11-28 20:49:35 +00:00
12 changed files with 132 additions and 108 deletions

View File

@@ -5,10 +5,10 @@ LibreNMS is a fork of [Observium][1]. Observium was written by:
Contributors to LibreNMS:
- Paul Gear <github@libertysys.com.au> (paulgear)
- Neil Lathwood <neil@lathwood.co.uk> (laf)
- Daniel Preussker <f0o@devilcode.org> (f0o)
- Neil Lathwood <neil@lathwood.co.uk> (laf)
- Daniel Preussker <f0o@devilcode.org> (f0o)
- Bohdan Sanders <git@bohdans.com> (bohdan-s)
- Toni Cunyat <elbuit@gmail.com> (elbuit)
[1]: http://observium.org/ "Observium web site"

View File

@@ -5,25 +5,32 @@ To gather data from remote systems you can use LibreNMS in combination with chec
On each of the hosts you would like to use the agent on then you need to do the following:
- Copy the check_mk_agent script into /usr/bin/ and make it executable.
* Copy the `check_mk_agent` script into `/usr/bin` and make it executable.
cp scripts/check_mk_agent /usr/bin/check_mk_agent
chmod +x /usr/bin/check_mk_agent
```shell
cp scripts/check_mk_agent /usr/bin/check_mk_agent
chmod +x /usr/bin/check_mk_agent
```
- Copy the xinetd config file into place.
* Copy the xinetd config file into place.
cp scripts/check_mk_xinetd /etc/xinetd.d/check_mk
```shell
cp scripts/check_mk_xinetd /etc/xinetd.d/check_mk
```
- Make the relevant directories.
* Create the relevant directories.
mkdir -p /usr/lib/check_mk_agent/plugins /usr/lib/check_mk_agent/local
```shell
mkdir -p /usr/lib/check_mk_agent/plugins /usr/lib/check_mk_agent/local
```
- Copy each of the scripts from scripts/agent-local/ into /usr/lib/check_mk_agent/local
* Copy each of the scripts from `scripts/agent-local/` into `/usr/lib/check_mk_agent/local`
* And restart xinetd.
- Now restart xinetd.
```shell
/etc/init.d/xinetd restart
```
/etc/init.d/xinetd restart
- Login to the LibreNMS web interface and edit the device you want to monitor. Under the modules section, ensure that unix-agent is enabled.
- Then under Applications, enable the apps that you plan to monitor.
- Wait, in around 10 minutes you should start seeing data in your graphs under Apps for the device.
* Login to the LibreNMS web interface and edit the device you want to monitor. Under the modules section, ensure that unix-agent is enabled.
* Then under Applications, enable the apps that you plan to monitor.
* Wait, in around 10 minutes you should start seeing data in your graphs under Apps for the device.

View File

@@ -1,10 +1,18 @@
# Billing Module
To enable and use the billing module you need to perform the following steps:
Edit config.php and add (or enable) the following line near the end of the config
$config['enable_billing'] = 1; # Enable Billing
Edit `config.php` and add (or enable) the following line near the end of the config
Edit /etc/cron.d/librenms and add the following:
*/5 * * * * root /opt/librenms/poll-billing.php >> /dev/null 2>&1
01 * * * * root /opt/librenms/billing-calculate.php >> /dev/null 2>&1
```php
$config['enable_billing'] = 1; # Enable Billing
```
Edit `/etc/cron.d/librenms` and add the following:
```bash
*/5 * * * * root /opt/librenms/poll-billing.php >> /dev/null 2>&1
01 * * * * root /opt/librenms/billing-calculate.php >> /dev/null 2>&1
```
Create billing graphs as required.

View File

@@ -9,7 +9,7 @@ that has LibreNMS already running on it!
To get started, you can just copy the script from `/contrib/dev_init`,
or you can enter the following commands into your shell:
```
```bash
mkdir -p dev/librenms && cd $_
curl -O http://wkennedy.co/uploads/librenms/Vagrantfile
curl -O http://wkennedy.co/uploads/librenms/bootstrap.sh

View File

@@ -14,13 +14,15 @@ Input the MySQL root password to enter the MySQL command-line interface.
Create the database:
CREATE DATABASE librenms;
GRANT ALL PRIVILEGES ON librenms.*
TO 'librenms'@'<ip>'
IDENTIFIED BY '<password>'
;
FLUSH PRIVILEGES;
exit
```sql
CREATE DATABASE librenms;
GRANT ALL PRIVILEGES ON librenms.*
TO 'librenms'@'<ip>'
IDENTIFIED BY '<password>'
;
FLUSH PRIVILEGES;
exit
```
Replace `<ip>` above with the IP or DNS name of the server running LibreNMS. If your database is on the same server as LibreNMS, you can use `localhost`.
@@ -41,18 +43,18 @@ This host is where the web server and SNMP poller run. It could be the same mac
Install the required software:
apt-get install libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-snmp php-pear snmp graphviz php5-mcrypt php5-json apache2 fping imagemagick whois mtr-tiny nmap python-mysqldb snmpd mysql-client php-net-ipv4 php-net-ipv6 rrdtool git
The packages listed above are an all-inclusive list of packages that were necessary on a clean install of Ubuntu 12.04/14.04.
You need to configure snmpd appropriately if you have not already done so. An absolute minimal config for snmpd is:
rocommunity public 127.0.0.1
Adding the above line to `/etc/snmp/snmpd.conf` and running `service snmpd restart` will activate this config.
In `/etc/php5/apache2/php.ini` and `/etc/php5/cli/php.ini`, ensure date.timezone is set to your preferred time zone. See http://php.net/manual/en/timezones.php for a list of supported timezones. Valid
examples are: "America/New York", "Australia/Brisbane", "Etc/UTC".
### Cloning ###
LibreNMS is installed using git. If you're not familiar with git, check out the [git book][2] or the tips at [git ready][3]. The initial install from github.com is called a `git clone`; subsequent updates are done through `git pull`.
@@ -62,7 +64,7 @@ You can clone the repository via HTTPS or SSH. In either case, you need to ensu
cd /opt
git clone https://github.com/librenms/librenms.git librenms
cd /opt/librenms
The recommended method of cloning a git repository is HTTPS. If you would like to clone via SSH instead, use the command `git clone git@github.com:librenms/librenms.git librenms` instead.
Sometimes the initial clone can take quite a while (nearly 3 minutes on a 10 Mbps fibre connection in Australia is a recent example). If it's a big problem to you, you can save about 50% of the bandwidth by not pulling down the full git history. This comes with some limitations (namely that you can't use it as the basis for further git repos), but if you're not planning to develop for LibreNMS it's an acceptable option. To perform the initial clone without full history, run the following instead:
@@ -85,17 +87,19 @@ First, create and chown the `rrd` directory and create the `logs` directory:
Next, add the following to `/etc/apache2/sites-available/librenms.conf`:
<VirtualHost *:80>
DocumentRoot /opt/librenms/html/
ServerName librenms.example.com
CustomLog /opt/librenms/logs/access_log combined
ErrorLog /opt/librenms/logs/error_log
AllowEncodedSlashes On
<Directory "/opt/librenms/html/">
AllowOverride All
Options FollowSymLinks MultiViews
</Directory>
</VirtualHost>
```apache
<VirtualHost *:80>
DocumentRoot /opt/librenms/html/
ServerName librenms.example.com
CustomLog /opt/librenms/logs/access_log combined
ErrorLog /opt/librenms/logs/error_log
AllowEncodedSlashes On
<Directory "/opt/librenms/html/">
AllowOverride All
Options FollowSymLinks MultiViews
</Directory>
</VirtualHost>
```
If you are running Apache 2.2.18 or higher then change AllowEncodedSlashes to NoDecode
@@ -112,7 +116,7 @@ Change `librenms.example.com` to the appropriate hostname for your domain, then
a2ensite librenms.conf
a2enmod rewrite
service apache2 restart
(To get to your LibreNMS install externally, you'll also need add it to your DNS or hosts file.)
### Manual vs. web installer ###
@@ -121,7 +125,7 @@ At this stage you can either launch the web installer by going to http://librenm
cp config.php.default config.php
vim config.php
Change the values to the right of the equal sign for lines beginning with `$config[db_]` to match your database information as setup above.
Change the value of `$config['snmp']['community']` from `public` to whatever your read-only SNMP community is. If you have multiple communities, set it to the most common.

View File

@@ -11,13 +11,15 @@ Enter the MySQL root password to enter the MySQL command-line interface.
Create database.
CREATE DATABASE librenms;
GRANT ALL PRIVILEGES ON librenms.*
TO 'librenms'@'<ip>'
IDENTIFIED BY '<password>'
;
FLUSH PRIVILEGES;
exit
```sql
CREATE DATABASE librenms;
GRANT ALL PRIVILEGES ON librenms.*
TO 'librenms'@'<ip>'
IDENTIFIED BY '<password>'
;
FLUSH PRIVILEGES;
exit
```
Replace `<ip>` above with the IP of the server running LibreNMS. If your database is on the same server as LibreNMS, you can just use `localhost` as the IP address.
@@ -36,7 +38,7 @@ Change `127.0.0.1` to the IP address that your MySQL server should listen on. R
Install necessary software. The packages listed below are an all-inclusive list of packages that were necessary on a clean install of Debian 7.
apt-get install lighttpd php5-cli php5-mysql php5-gd php5-snmp php5-cgi php-pear snmp graphviz mysql-server mysql-client rrdtool sendmail fping imagemagick whois mtr-tiny nmap ipmitool php5-mcrypt php5-json python-mysqldb snmpd php-net-ipv4 php-net-ipv6 rrdtool git
### Cloning ###
You can clone the repository via HTTPS or SSH. In either case, you need to ensure the appropriate port (443 for HTTPS, 22 for SSH) is open in the outbound direction for your server.
@@ -49,7 +51,7 @@ At this stage you can either launch the web installer by going to http://IP/inst
cp config.php.default config.php
vim config.php
> NOTE: The recommended method of cloning a git repository is HTTPS. If you would like to clone via SSH instead, use the command `git clone git@github.com:librenms/librenms.git librenms` instead.
Change the values to the right of the equal sign for lines beginning with `$config[db_]` to match your database information as setup above.
@@ -111,7 +113,7 @@ Enable fastcgi in Lighttpd by running the following commands,
And add the following to /etc/php5/cgi/php.ini
cgi.fix_pathinfo = 1
then restart Lighttpd:
service lighttpd restart
@@ -145,6 +147,3 @@ LibreNMS performs daily updates by default. At 00:15 system time every day, a `
so that it looks like this:
$config['update'] = 0;

View File

@@ -16,13 +16,15 @@ Enter the MySQL root password to enter the MySQL command-line interface.
Create database.
CREATE DATABASE librenms;
GRANT ALL PRIVILEGES ON librenms.*
TO 'librenms'@'<ip>'
IDENTIFIED BY '<password>'
;
FLUSH PRIVILEGES;
exit
```sql
CREATE DATABASE librenms;
GRANT ALL PRIVILEGES ON librenms.*
TO 'librenms'@'<ip>'
IDENTIFIED BY '<password>'
;
FLUSH PRIVILEGES;
exit
```
Replace `<ip>` above with the IP of the server running LibreNMS. If your database is on the same server as LibreNMS, you can just use `localhost` as the IP address.
@@ -57,17 +59,19 @@ Set `httpd` to start on system boot.
Next, add the following to `/etc/httpd/conf.d/librenms.conf`
<VirtualHost *:80>
DocumentRoot /opt/librenms/html/
ServerName librenms.example.com
CustomLog /opt/librenms/logs/access_log combined
ErrorLog /opt/librenms/logs/error_log
AllowEncodedSlashes On
<Directory "/opt/librenms/html/">
AllowOverride All
Options FollowSymLinks MultiViews
</Directory>
</VirtualHost>
```apache
<VirtualHost *:80>
DocumentRoot /opt/librenms/html/
ServerName librenms.example.com
CustomLog /opt/librenms/logs/access_log combined
ErrorLog /opt/librenms/logs/error_log
AllowEncodedSlashes On
<Directory "/opt/librenms/html/">
AllowOverride All
Options FollowSymLinks MultiViews
</Directory>
</VirtualHost>
```
If you are running Apache 2.2.18 or higher then change `AllowEncodedSlashes` to `NoDecode`
@@ -87,29 +91,31 @@ Modify permissions and configuration for `php-fpm` to use nginx credentials.
Add configuration for `nginx` at `/etc/nginx/conf.d/librenms` with the following content:
server {
listen 80;
server_name librenms.example.com;
root /opt/librenms/html;
index index.php;
access_log /opt/librenms/logs/access_log;
error_log /opt/librenms/logs/error_log;
location / {
try_files $uri $uri/ @librenms;
}
location ~ \.php {
include fastcgi.conf;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
location ~ /\.ht {
deny all;
}
location @librenms {
rewrite ^api/v0(.*)$ /api_v0.php/$1 last;
rewrite ^(.+)$ /index.php/$1 last;
}
}
```nginx
server {
listen 80;
server_name librenms.example.com;
root /opt/librenms/html;
index index.php;
access_log /opt/librenms/logs/access_log;
error_log /opt/librenms/logs/error_log;
location / {
try_files $uri $uri/ @librenms;
}
location ~ \.php {
include fastcgi.conf;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
location ~ /\.ht {
deny all;
}
location @librenms {
rewrite ^api/v0(.*)$ /api_v0.php/$1 last;
rewrite ^(.+)$ /index.php/$1 last;
}
}
```
### Cloning ###

View File

@@ -41,7 +41,7 @@ Function( (Type) $Variable [= Default] [,...] ) | Returns | Description
### <a name="glob.attr">Attributes</a>
Attribute | Type | Description
--- | --- | ---
--- | --- | ---
`$params` | `String` | Contains all arguments that are passed to the `.command`.
`$this->chan` | `Array` | Channels that are configured.
`$this->commands` | `Array` | Contains accessible `commands`.
@@ -77,4 +77,4 @@ Attribute | Type | Description
...
$config['irc_external'][] = "join-ng";
...
```
```

View File

@@ -127,4 +127,4 @@ File: includes/ircbot/echo.inc.php
} else {
return $this->respond("root shouldn't be online so late!");
}
```
```

View File

@@ -10,7 +10,7 @@ Table of Content:
# <a name="about">About</a>:
Librenms can interpret, display and group certain additional information on ports.
For this a small `bash` script is supplied in `librenms/scripts` called `ifAlias`.
For this a small `bash` script is supplied in `librenms/scripts` called `ifAlias`.
<a name="setup">Setup</a>:
@@ -52,4 +52,4 @@ See [examples](#examples) for formats.
# <a name="source">Sourcecode</a>:
* https://github.com/librenms/librenms/blob/master/scripts/ifAlias
* https://github.com/librenms/librenms/blob/master/scripts/ifAlias

View File

@@ -65,7 +65,7 @@ Reasons why you might want to use LibreNMS instead of Observium:
"Free Software Foundation - what is free software?"
[7]: http://libertysys.com.au/blog/observium-and-gpl
"Paul's blog on what the GPL offers users"
[8]: https://github.com/librenms/librenms/blob/master/doc/CONTRIBUTING.md
[8]: https://github.com/librenms/librenms/blob/master/doc/CONTRIBUTING.md
"Contribution guidelines"
[9]: https://github.com/librenms/librenms/issues
"LibreNMS issue database at GitHub"

View File

@@ -7,7 +7,7 @@ Roadmap
obviously not be as customised as the specifically supported devices
but should still be useful to users.
- Ruckus wireless controllers
- Functionality/performance improvements:
- Eliminate interface churn for transient interfaces (e.g. ppp/tun)
on net-snmp.