mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
doc: Update markdown flavored syntax (using linguist)
This commit is contained in:
+21
-14
@@ -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.
|
||||
|
||||
+13
-5
@@ -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.
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+22
-18
@@ -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`.
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
+47
-41
@@ -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 ###
|
||||
|
||||
|
||||
Reference in New Issue
Block a user