mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Remove tabs from yaml (#14437)
* Remove tabs from yaml * Remove tabs from random files
This commit is contained in:
@@ -7,18 +7,18 @@
|
|||||||
|
|
||||||
# Apply fixes from StyleCI
|
# Apply fixes from StyleCI
|
||||||
77c531527c0bf218038f8349e81f50d5386739a6
|
77c531527c0bf218038f8349e81f50d5386739a6
|
||||||
82f43cb98dbe25d6e6fea4e787fa26aca898e41d
|
82f43cb98dbe25d6e6fea4e787fa26aca898e41d
|
||||||
29f45ca352a8c5d5c308f93ce1240b7fdfc1c936
|
29f45ca352a8c5d5c308f93ce1240b7fdfc1c936
|
||||||
2fc3a2121107c796cb0cf3e310c3a869a5b5798f
|
2fc3a2121107c796cb0cf3e310c3a869a5b5798f
|
||||||
|
|
||||||
# Fix coding style part 2
|
# Fix coding style part 2
|
||||||
d8693f05ae4d9ec884cd2c2d850e7f78ba9dc2ae
|
d8693f05ae4d9ec884cd2c2d850e7f78ba9dc2ae
|
||||||
|
|
||||||
# Merge pull request #1449 from job/coding_style_old_files2
|
# Merge pull request #1449 from job/coding_style_old_files2
|
||||||
61b14557ce45f8c6d90482075464aad1fae5e209
|
61b14557ce45f8c6d90482075464aad1fae5e209
|
||||||
|
|
||||||
# Merge pull request #1444 from job/coding_style_old_files2
|
# Merge pull request #1444 from job/coding_style_old_files2
|
||||||
4ebabc634ab098d4f9721ea7f357baf029a6bf9c
|
4ebabc634ab098d4f9721ea7f357baf029a6bf9c
|
||||||
|
|
||||||
# Merge pull request #1431 from job/coding_style_old_files
|
# Merge pull request #1431 from job/coding_style_old_files
|
||||||
89206b393978d8b42e3755698ca5542be7277270
|
89206b393978d8b42e3755698ca5542be7277270
|
||||||
|
|||||||
+1
-1
@@ -146,7 +146,7 @@ LibreNMS contributors:
|
|||||||
- Joseph Eames <j.eames@outlook.com> (j-ems)
|
- Joseph Eames <j.eames@outlook.com> (j-ems)
|
||||||
- Eric Conroy <eric@conroy.co> (NetworkNub)
|
- Eric Conroy <eric@conroy.co> (NetworkNub)
|
||||||
- Timothy Willey <developer@timothywilley.net> (twilley)
|
- Timothy Willey <developer@timothywilley.net> (twilley)
|
||||||
- Jon Ward <librenms@yonzb.net> (yon2004)
|
- Jon Ward <librenms@yonzb.net> (yon2004)
|
||||||
- Ian Viemeister <github@ian.viemeister.com> (iviemeister)
|
- Ian Viemeister <github@ian.viemeister.com> (iviemeister)
|
||||||
- Thane Gill <me@thanegill.com> (thanegill)
|
- Thane Gill <me@thanegill.com> (thanegill)
|
||||||
- Christoffer Stokbæk <christoffers@easyspeedy.com> (stokbaek)
|
- Christoffer Stokbæk <christoffers@easyspeedy.com> (stokbaek)
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
{!! Str::markdown($device->notes ?? '') !!}
|
{!! Str::markdown($device->notes ?? '') !!}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
<div class="pull-left" style="margin-top: 5px;">
|
<div class="pull-left" style="margin-top: 5px;">
|
||||||
<span style="font-size: 20px;">{{ $title }}</a></span><br>
|
<span style="font-size: 20px;">{{ $title }}</a></span><br>
|
||||||
Description
|
Description
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ This is currently being tested, use at your own risk.
|
|||||||
|
|
||||||
LibreNMS can be used with a MariaDB Galera Cluster. This is a Multi Master cluster, meaning each
|
LibreNMS can be used with a MariaDB Galera Cluster. This is a Multi Master cluster, meaning each
|
||||||
node in the cluster can read and write to the database. They all have the same ability. LibreNMS will
|
node in the cluster can read and write to the database. They all have the same ability. LibreNMS will
|
||||||
randomly choose a working node to read and write requests to.
|
randomly choose a working node to read and write requests to.
|
||||||
|
|
||||||
|
|
||||||
For more information see
|
For more information see
|
||||||
@@ -14,7 +14,7 @@ For more information see
|
|||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
* It is best practice to have a minimum of 3 nodes in the cluster, A odd number of nodes is recommended in the event nodes have a disagreement on data, they will have a tie breaker.
|
* It is best practice to have a minimum of 3 nodes in the cluster, A odd number of nodes is recommended in the event nodes have a disagreement on data, they will have a tie breaker.
|
||||||
* It's recommended that all servers be similar in hardware performance, cluster performance can be affected by the slowest server in the cluster.
|
* It's recommended that all servers be similar in hardware performance, cluster performance can be affected by the slowest server in the cluster.
|
||||||
* Backup the database before starting, and backing up the database regularly is still recommended even in a working cluster environment.
|
* Backup the database before starting, and backing up the database regularly is still recommended even in a working cluster environment.
|
||||||
|
|
||||||
## Install and Configure Galera
|
## Install and Configure Galera
|
||||||
@@ -52,7 +52,7 @@ wsrep_sst_method=rsync
|
|||||||
wsrep_node_address="192.168.1.35"
|
wsrep_node_address="192.168.1.35"
|
||||||
wsrep_node_name="librenms1.35"
|
wsrep_node_name="librenms1.35"
|
||||||
```
|
```
|
||||||
Change the following values for your environment.
|
Change the following values for your environment.
|
||||||
* wsrep_cluster_address - All the IP address's of your nodes.
|
* wsrep_cluster_address - All the IP address's of your nodes.
|
||||||
* wsrep_cluster_name - Name of cluster, should be the same for all nodes
|
* wsrep_cluster_name - Name of cluster, should be the same for all nodes
|
||||||
* wsrep_node_address - IP address of this node.
|
* wsrep_node_address - IP address of this node.
|
||||||
@@ -60,12 +60,12 @@ Change the following values for your environment.
|
|||||||
|
|
||||||
### Edit LibreNMS .env
|
### Edit LibreNMS .env
|
||||||
|
|
||||||
LibreNMS supports up to 9 galera nodes, you define these nodes in the .env file. For each node we have the ability to define if this librenms installation/poller is able to write, read or both to that node.
|
LibreNMS supports up to 9 galera nodes, you define these nodes in the .env file. For each node we have the ability to define if this librenms installation/poller is able to write, read or both to that node.
|
||||||
The galera nodes you define here can be the same or differnt for each librenms poller. If you have a poller you only want to write/read to one galera node, you would simply add one DB_HOST, and omit all the rest. This allows you to precisely control what galera nodes a librenms poller is reading and or writing too.
|
The galera nodes you define here can be the same or differnt for each librenms poller. If you have a poller you only want to write/read to one galera node, you would simply add one DB_HOST, and omit all the rest. This allows you to precisely control what galera nodes a librenms poller is reading and or writing too.
|
||||||
|
|
||||||
* DB_HOST is always set to read/write.
|
* DB_HOST is always set to read/write.
|
||||||
* DB_HOST must be set, however, it does not have to be the same on each poller, it can be different as long as it's part of the same galera cluster.
|
* DB_HOST must be set, however, it does not have to be the same on each poller, it can be different as long as it's part of the same galera cluster.
|
||||||
* If the node that is set to DB_HOST is down, things like ```lnms db``` command no longer work, as they only use DB_HOST and don't failover to other nodes.
|
* If the node that is set to DB_HOST is down, things like ```lnms db``` command no longer work, as they only use DB_HOST and don't failover to other nodes.
|
||||||
* Set DB_CONNECTION=mysql_cluster to enable
|
* Set DB_CONNECTION=mysql_cluster to enable
|
||||||
* DB_STICKY can be used if you are pulling out of sync data form the database in a read request. For more information see
|
* DB_STICKY can be used if you are pulling out of sync data form the database in a read request. For more information see
|
||||||
<https://laravel.com/docs/database#the-sticky-option>
|
<https://laravel.com/docs/database#the-sticky-option>
|
||||||
@@ -88,7 +88,7 @@ DB_USERNAME=librenms
|
|||||||
DB_PASSWORD=password
|
DB_PASSWORD=password
|
||||||
```
|
```
|
||||||
The above .env on a librenms installation/poller would communicate to each galera node as follows.
|
The above .env on a librenms installation/poller would communicate to each galera node as follows.
|
||||||
|
|
||||||
* 192.168.1.35 - Read/Write
|
* 192.168.1.35 - Read/Write
|
||||||
* 192.168.1.36 - Read/Write
|
* 192.168.1.36 - Read/Write
|
||||||
* 192.168.1.37 - Read/Write
|
* 192.168.1.37 - Read/Write
|
||||||
@@ -98,17 +98,17 @@ The above .env on a librenms installation/poller would communicate to each galer
|
|||||||
### Starting Galera Cluster for the first time.
|
### Starting Galera Cluster for the first time.
|
||||||
|
|
||||||
1) Shutdown MariaDB server on ALL nodes.
|
1) Shutdown MariaDB server on ALL nodes.
|
||||||
```bash
|
```bash
|
||||||
sudo systemctl stop mariadb-server
|
sudo systemctl stop mariadb-server
|
||||||
```
|
```
|
||||||
2) On the server with your existing database or any mariadb server if you are starting without existing data, run the following command
|
2) On the server with your existing database or any mariadb server if you are starting without existing data, run the following command
|
||||||
```bash
|
```bash
|
||||||
sudo galera_new_cluster
|
sudo galera_new_cluster
|
||||||
```
|
```
|
||||||
3) Start the rest of the nodes normally.
|
3) Start the rest of the nodes normally.
|
||||||
```bash
|
```bash
|
||||||
sudo systemctl start mariadb-server
|
sudo systemctl start mariadb-server
|
||||||
```
|
```
|
||||||
|
|
||||||
### Galera Cluster Status
|
### Galera Cluster Status
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ In the database run following mysql query
|
|||||||
SHOW GLOBAL STATUS LIKE 'wsrep_%';
|
SHOW GLOBAL STATUS LIKE 'wsrep_%';
|
||||||
```
|
```
|
||||||
|
|
||||||
| Variable Name | Value | Notes |
|
| Variable Name | Value | Notes |
|
||||||
| :----: | :----: | :----: |
|
| :----: | :----: | :----: |
|
||||||
| ----------------------------------- | ----------------------------------------------------------------|---------------------------------------------------------|
|
| ----------------------------------- | ----------------------------------------------------------------|---------------------------------------------------------|
|
||||||
| wsrep_cluster_size | 2 | Current number of nodes in Cluster |
|
| wsrep_cluster_size | 2 | Current number of nodes in Cluster |
|
||||||
@@ -150,6 +150,6 @@ seqno: -1
|
|||||||
safe_to_bootstrap: 1
|
safe_to_bootstrap: 1
|
||||||
```
|
```
|
||||||
|
|
||||||
If the safe_to_bootstrap = 1, then Galera determined that this node has the most up-to-date database and can be safeley used to start the cluster.
|
If the safe_to_bootstrap = 1, then Galera determined that this node has the most up-to-date database and can be safeley used to start the cluster.
|
||||||
|
|
||||||
Once you have found a node that can be used for starting the cluster, follow the steps in starting for the first time.
|
Once you have found a node that can be used for starting the cluster, follow the steps in starting for the first time.
|
||||||
|
|||||||
+190
-190
@@ -6,14 +6,14 @@ LibreNMS has support for [Laravel Socialite](https://github.com/laravel/socialit
|
|||||||
|
|
||||||
[Socialite Providers](https://socialiteproviders.com) supports more than 100+ 3rd parties so you will most likely find support for the SAML or OAuth provider you need without too much trouble.
|
[Socialite Providers](https://socialiteproviders.com) supports more than 100+ 3rd parties so you will most likely find support for the SAML or OAuth provider you need without too much trouble.
|
||||||
|
|
||||||
Please do note however, these providers are not maintained by LibreNMS so we cannot add support for new ones and we can only provide you basic help with general configuration.
|
Please do note however, these providers are not maintained by LibreNMS so we cannot add support for new ones and we can only provide you basic help with general configuration.
|
||||||
See the Socialite Providers website for more information on adding a new OAuth provider.
|
See the Socialite Providers website for more information on adding a new OAuth provider.
|
||||||
|
|
||||||
Below we will guide you on how to install SAML or some of these OAth providers, you should be able to use these as a guide on how to install any others you may need but **please, please, ensure you read the Socialite Providers documentation carefully**.
|
Below we will guide you on how to install SAML or some of these OAth providers, you should be able to use these as a guide on how to install any others you may need but **please, please, ensure you read the Socialite Providers documentation carefully**.
|
||||||
|
|
||||||
[GitHub Provider](https://socialiteproviders.com/GitHub/)
|
[GitHub Provider](https://socialiteproviders.com/GitHub/)
|
||||||
[Microsoft Provider](https://socialiteproviders.com/Microsoft/)
|
[Microsoft Provider](https://socialiteproviders.com/Microsoft/)
|
||||||
[Okta Provider](https://socialiteproviders.com/Okta)
|
[Okta Provider](https://socialiteproviders.com/Okta)
|
||||||
[SAML2](https://socialiteproviders.com/Saml2/)
|
[SAML2](https://socialiteproviders.com/Saml2/)
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
@@ -34,61 +34,61 @@ Please ensure you set `APP_URL` within your `.env` file so that callback URLs wo
|
|||||||
|
|
||||||
=== "GitHub"
|
=== "GitHub"
|
||||||
|
|
||||||
`lnms plugin:add socialiteproviders/github`
|
`lnms plugin:add socialiteproviders/github`
|
||||||
|
|
||||||
=== "Microsoft"
|
=== "Microsoft"
|
||||||
|
|
||||||
`lnms plugin:add socialiteproviders/microsoft`
|
`lnms plugin:add socialiteproviders/microsoft`
|
||||||
|
|
||||||
=== "Okta"
|
=== "Okta"
|
||||||
|
|
||||||
`lnms plugin:add socialiteproviders/okta'
|
`lnms plugin:add socialiteproviders/okta'
|
||||||
|
|
||||||
### Find the provider name
|
### Find the provider name
|
||||||
|
|
||||||
Next we need to find the provider name and writing it down
|
Next we need to find the provider name and writing it down
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
It's almost always the name of the provider in lowercase but can be different so check the Socialite Providers documentation and look for this line, `github => [` which will give you the name you need for the above command: `github`.
|
It's almost always the name of the provider in lowercase but can be different so check the Socialite Providers documentation and look for this line, `github => [` which will give you the name you need for the above command: `github`.
|
||||||
|
|
||||||
=== "GitHub"
|
=== "GitHub"
|
||||||
|
|
||||||
For GitHub we can find the line:
|
For GitHub we can find the line:
|
||||||
```php
|
```php
|
||||||
'github' => [
|
'github' => [
|
||||||
'client_id' => env('GITHUB_CLIENT_ID'),
|
'client_id' => env('GITHUB_CLIENT_ID'),
|
||||||
'client_secret' => env('GITHUB_CLIENT_SECRET'),
|
'client_secret' => env('GITHUB_CLIENT_SECRET'),
|
||||||
'redirect' => env('GITHUB_REDIRECT_URI')
|
'redirect' => env('GITHUB_REDIRECT_URI')
|
||||||
],
|
],
|
||||||
```
|
```
|
||||||
So our provider name is `github`, write this down.
|
So our provider name is `github`, write this down.
|
||||||
|
|
||||||
|
|
||||||
=== "Microsoft"
|
=== "Microsoft"
|
||||||
|
|
||||||
For Microsoft we can find the line:
|
For Microsoft we can find the line:
|
||||||
```php
|
```php
|
||||||
'microsoft' => [
|
'microsoft' => [
|
||||||
'client_id' => env('MICROSOFT_CLIENT_ID'),
|
'client_id' => env('MICROSOFT_CLIENT_ID'),
|
||||||
'client_secret' => env('MICROSOFT_CLIENT_SECRET'),
|
'client_secret' => env('MICROSOFT_CLIENT_SECRET'),
|
||||||
'redirect' => env('MICROSOFT_REDIRECT_URI')
|
'redirect' => env('MICROSOFT_REDIRECT_URI')
|
||||||
],
|
],
|
||||||
```
|
```
|
||||||
So our provider name is `microsoft`, write this down.
|
So our provider name is `microsoft`, write this down.
|
||||||
|
|
||||||
|
|
||||||
=== "Okta"
|
=== "Okta"
|
||||||
|
|
||||||
For Okta we can find the line:
|
For Okta we can find the line:
|
||||||
```php
|
```php
|
||||||
'okta' => [
|
'okta' => [
|
||||||
'base_url' => env('OKTA_BASE_URL'),
|
'base_url' => env('OKTA_BASE_URL'),
|
||||||
'client_id' => env('OKTA_CLIENT_ID'),
|
'client_id' => env('OKTA_CLIENT_ID'),
|
||||||
'client_secret' => env('OKTA_CLIENT_SECRET'),
|
'client_secret' => env('OKTA_CLIENT_SECRET'),
|
||||||
'redirect' => env('OKTA_REDIRECT_URI')
|
'redirect' => env('OKTA_REDIRECT_URI')
|
||||||
],
|
],
|
||||||
```
|
```
|
||||||
So our provider name is `okta`, write this down.
|
So our provider name is `okta`, write this down.
|
||||||
|
|
||||||
|
|
||||||
### Register OAuth application
|
### Register OAuth application
|
||||||
@@ -98,72 +98,72 @@ Next we need to find the provider name and writing it down
|
|||||||
Now we need some values from the OAuth provider itself, in most cases you need to register a new "OAuth application" at the providers site. This will vary from provider to provider but the process itself should be similar to the examples below.
|
Now we need some values from the OAuth provider itself, in most cases you need to register a new "OAuth application" at the providers site. This will vary from provider to provider but the process itself should be similar to the examples below.
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
The callback URL is always: https://*your-librenms-url*/auth/*provider*/callback
|
The callback URL is always: https://*your-librenms-url*/auth/*provider*/callback
|
||||||
It doesn't need to be a public available site, but it almost always needs to support TLS (https)!
|
It doesn't need to be a public available site, but it almost always needs to support TLS (https)!
|
||||||
|
|
||||||
=== "GitHub"
|
=== "GitHub"
|
||||||
For our example with GitHub we go to [GitHub Developer Settings](https://github.com/settings/developers) and press "Register a new application":
|
For our example with GitHub we go to [GitHub Developer Settings](https://github.com/settings/developers) and press "Register a new application":
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Fill out the form accordingly (with your own values):
|
Fill out the form accordingly (with your own values):
|
||||||

|

|
||||||
|
|
||||||
=== "Microsoft"
|
=== "Microsoft"
|
||||||
For our example with Microsoft we go to ["Azure Active Directory" > "App registrations"](https://aad.portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps) and press "New registration"
|
For our example with Microsoft we go to ["Azure Active Directory" > "App registrations"](https://aad.portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps) and press "New registration"
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Fill out the form accordingly using your own values):
|
Fill out the form accordingly using your own values):
|
||||||

|

|
||||||
|
|
||||||
Copy the value of the **Application (client) ID** and **Directory (tenant) ID** and save them, you will need them in the next step.
|
Copy the value of the **Application (client) ID** and **Directory (tenant) ID** and save them, you will need them in the next step.
|
||||||

|

|
||||||
|
|
||||||
=== "Okta"
|
=== "Okta"
|
||||||
For our example with Okta, we go to `Applications>Create App Integration`, Select `OIDC - OpenID Connect`, then `Web Application`.
|
For our example with Okta, we go to `Applications>Create App Integration`, Select `OIDC - OpenID Connect`, then `Web Application`.
|
||||||
|
|
||||||
! [socialite-okta-1](/img/socialite-okta-1.png)
|
! [socialite-okta-1](/img/socialite-okta-1.png)
|
||||||
|
|
||||||
Fill in the Name, Logo, and Assignments based on your preferred settings. Leave the `Sign-In Redirect URI` field, this is where you will edit this later:
|
Fill in the Name, Logo, and Assignments based on your preferred settings. Leave the `Sign-In Redirect URI` field, this is where you will edit this later:
|
||||||

|

|
||||||
|
|
||||||
Note your Okta domain or login url. Sometimes this can be a vanity url like `login.company.com`, or sometimes just `company.okta.com`.
|
Note your Okta domain or login url. Sometimes this can be a vanity url like `login.company.com`, or sometimes just `company.okta.com`.
|
||||||
|
|
||||||
Click save.
|
Click save.
|
||||||
|
|
||||||
#### Generate a new client secret
|
#### Generate a new client secret
|
||||||
|
|
||||||
=== "GitHub"
|
=== "GitHub"
|
||||||
|
|
||||||
Press 'Generate a new client secret' to get a new client secret.
|
Press 'Generate a new client secret' to get a new client secret.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Copy the **Client ID** and **Client secret**
|
Copy the **Client ID** and **Client secret**
|
||||||
|
|
||||||
In the example above it is:
|
|
||||||
|
|
||||||
**Client ID**: 7a41f1d8215640ca6b00
|
In the example above it is:
|
||||||
**Client secret**: ea03957288edd0e590be202b239e4f0ff26b8047
|
|
||||||
|
**Client ID**: 7a41f1d8215640ca6b00
|
||||||
|
**Client secret**: ea03957288edd0e590be202b239e4f0ff26b8047
|
||||||
|
|
||||||
=== "Microsoft"
|
=== "Microsoft"
|
||||||
|
|
||||||
Select Certificates & secrets under Manage.
|
Select Certificates & secrets under Manage.
|
||||||
Select the 'New client secret' button.
|
Select the 'New client secret' button.
|
||||||
Enter a value in Description and select one of the options for Expires and select 'Add'.
|
Enter a value in Description and select one of the options for Expires and select 'Add'.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Copy the client secret **Value** (not Secret ID!) before you leave this page. You will need it in the next step.
|
Copy the client secret **Value** (not Secret ID!) before you leave this page. You will need it in the next step.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
=== "Okta"
|
=== "Okta"
|
||||||
|
|
||||||
This step is done for you when creating the app. All you have to do is copy down the client secret. You will need it in the next step.
|
This step is done for you when creating the app. All you have to do is copy down the client secret. You will need it in the next step.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
### Saving configuration
|
### Saving configuration
|
||||||
@@ -174,102 +174,102 @@ The format of the configuration string is `auth.socialite.configs.*provider name
|
|||||||
|
|
||||||
=== "GitHub"
|
=== "GitHub"
|
||||||
|
|
||||||
!!! setting "auth/socialite"
|
!!! setting "auth/socialite"
|
||||||
```bash
|
```bash
|
||||||
lnms config:set auth.socialite.configs.github.client_id 7a41f1d8215640ca6b00
|
lnms config:set auth.socialite.configs.github.client_id 7a41f1d8215640ca6b00
|
||||||
lnms config:set auth.socialite.configs.github.client_secret ea03957288edd0e590be202b239e4f0ff26b8047
|
lnms config:set auth.socialite.configs.github.client_secret ea03957288edd0e590be202b239e4f0ff26b8047
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "Microsoft"
|
=== "Microsoft"
|
||||||
|
|
||||||
!!! setting "auth/socialite"
|
!!! setting "auth/socialite"
|
||||||
```bash
|
```bash
|
||||||
lnms config:set auth.socialite.configs.microsoft.client_id 7983ac13-c955-40e9-9b85-5ba27be52a52
|
lnms config:set auth.socialite.configs.microsoft.client_id 7983ac13-c955-40e9-9b85-5ba27be52a52
|
||||||
lnms config:set auth.socialite.configs.microsoft.client_secret J9P7Q~K2F5C.L243sqzbGj.cOOcjTBgAPak_l
|
lnms config:set auth.socialite.configs.microsoft.client_secret J9P7Q~K2F5C.L243sqzbGj.cOOcjTBgAPak_l
|
||||||
lnms config:set auth.socialite.configs.microsoft.tenant a15edc05-152d-4eb4-973c-14f1fdc57d8b
|
lnms config:set auth.socialite.configs.microsoft.tenant a15edc05-152d-4eb4-973c-14f1fdc57d8b
|
||||||
```
|
```
|
||||||
|
|
||||||
=== "Okta"
|
=== "Okta"
|
||||||
|
|
||||||
!!! setting "auth/socialite"
|
!!! setting "auth/socialite"
|
||||||
```bash
|
```bash
|
||||||
lnms config:set auth.socialite.configs.okta.client_id 0oa1c08tti8D7xgXb697
|
lnms config:set auth.socialite.configs.okta.client_id 0oa1c08tti8D7xgXb697
|
||||||
lnms config:set auth.socialite.configs.okta.client_secret sWew90IKqKDmURj1XLsCPjXjre0U3zmJuFR6SzsG
|
lnms config:set auth.socialite.configs.okta.client_secret sWew90IKqKDmURj1XLsCPjXjre0U3zmJuFR6SzsG
|
||||||
lnms config:set auth.socialite.configs.okta.base_url "https://<okta_login_url>"
|
lnms config:set auth.socialite.configs.okta.base_url "https://<okta_login_url>"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Add provider event listener
|
### Add provider event listener
|
||||||
|
|
||||||
The final step is to now add an event listener.
|
The final step is to now add an event listener.
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
It's important to copy exactly the right value here,
|
It's important to copy exactly the right value here,
|
||||||
It should begin with a `\` and end before the `::class.'@handle'`
|
It should begin with a `\` and end before the `::class.'@handle'`
|
||||||
|
|
||||||
=== "GitHub"
|
=== "GitHub"
|
||||||
|
|
||||||
Find the section looking like:
|
Find the section looking like:
|
||||||
```php
|
```php
|
||||||
protected $listen = [
|
protected $listen = [
|
||||||
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
|
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
|
||||||
// ... other providers
|
// ... other providers
|
||||||
\SocialiteProviders\GitHub\GitHubExtendSocialite::class.'@handle',
|
\SocialiteProviders\GitHub\GitHubExtendSocialite::class.'@handle',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
```
|
```
|
||||||
|
|
||||||
Copy the part: `\SocialiteProviders\GitHub\GitHubExtendSocialite` and run;
|
Copy the part: `\SocialiteProviders\GitHub\GitHubExtendSocialite` and run;
|
||||||
!!! setting "auth/socialite"
|
!!! setting "auth/socialite"
|
||||||
```bash
|
```bash
|
||||||
lnms config:set auth.socialite.configs.github.listener "\SocialiteProviders\GitHub\GitHubExtendSocialite"
|
lnms config:set auth.socialite.configs.github.listener "\SocialiteProviders\GitHub\GitHubExtendSocialite"
|
||||||
```
|
```
|
||||||
Don't forget the initial backslash (\\) !
|
Don't forget the initial backslash (\\) !
|
||||||
|
|
||||||
=== "Microsoft"
|
=== "Microsoft"
|
||||||
|
|
||||||
Find the section looking like:
|
Find the section looking like:
|
||||||
```php
|
```php
|
||||||
protected $listen = [
|
protected $listen = [
|
||||||
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
|
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
|
||||||
// ... other providers
|
// ... other providers
|
||||||
\SocialiteProviders\Microsoft\MicrosoftExtendSocialite::class.'@handle',
|
\SocialiteProviders\Microsoft\MicrosoftExtendSocialite::class.'@handle',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
```
|
```
|
||||||
|
|
||||||
Copy the part: `\SocialiteProviders\Microsoft\MicrosoftExtendSocialite` and run;
|
Copy the part: `\SocialiteProviders\Microsoft\MicrosoftExtendSocialite` and run;
|
||||||
!!! setting "auth/socialite"
|
!!! setting "auth/socialite"
|
||||||
```bash
|
```bash
|
||||||
lnms config:set auth.socialite.configs.microsoft.listener "\SocialiteProviders\Microsoft\MicrosoftExtendSocialite"
|
lnms config:set auth.socialite.configs.microsoft.listener "\SocialiteProviders\Microsoft\MicrosoftExtendSocialite"
|
||||||
```
|
```
|
||||||
Don't forget the initial backslash (\\) !
|
Don't forget the initial backslash (\\) !
|
||||||
|
|
||||||
=== "Okta"
|
=== "Okta"
|
||||||
|
|
||||||
Find the section looking like:
|
Find the section looking like:
|
||||||
```php
|
```php
|
||||||
protected $listen = [
|
protected $listen = [
|
||||||
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
|
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
|
||||||
// ... other providers
|
// ... other providers
|
||||||
\SocialiteProviders\Okta\OktaExtendSocialite::class.'@handle',
|
\SocialiteProviders\Okta\OktaExtendSocialite::class.'@handle',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
```
|
```
|
||||||
|
|
||||||
Copy the part: `\SocialiteProviders\Okta\OktaExtendSocialite` and run;
|
Copy the part: `\SocialiteProviders\Okta\OktaExtendSocialite` and run;
|
||||||
!!! setting "auth/socialite"
|
!!! setting "auth/socialite"
|
||||||
```bash
|
```bash
|
||||||
lnms config:set auth.socialite.configs.okta.listener "\SocialiteProviders\Okta\OktaExtendSocialite"
|
lnms config:set auth.socialite.configs.okta.listener "\SocialiteProviders\Okta\OktaExtendSocialite"
|
||||||
```
|
```
|
||||||
Don't forget the initial backslack (\\) !
|
Don't forget the initial backslack (\\) !
|
||||||
|
|
||||||
Now you are done with setting up the OAuth provider!
|
Now you are done with setting up the OAuth provider!
|
||||||
If it doesn't work, please double check your configuration values by using the `config:get` command below.
|
If it doesn't work, please double check your configuration values by using the `config:get` command below.
|
||||||
|
|
||||||
!!! setting "auth/socialite"
|
!!! setting "auth/socialite"
|
||||||
```bash
|
```bash
|
||||||
lnms config:get auth.socialite
|
lnms config:get auth.socialite
|
||||||
```
|
```
|
||||||
|
|
||||||
## SAML2 Example
|
## SAML2 Example
|
||||||
|
|
||||||
@@ -283,109 +283,109 @@ lnms plugin:add socialiteproviders/saml2
|
|||||||
|
|
||||||
### Add configuration
|
### Add configuration
|
||||||
|
|
||||||
Depending on what your identity provider (Google, Azure, ...) supports, the configuration could look different from what you see next so please use this as a rough guide.
|
Depending on what your identity provider (Google, Azure, ...) supports, the configuration could look different from what you see next so please use this as a rough guide.
|
||||||
It is up the IdP to provide the relevant details that you will need for configuration.
|
It is up the IdP to provide the relevant details that you will need for configuration.
|
||||||
|
|
||||||
=== "Google"
|
=== "Google"
|
||||||
|
|
||||||
Go to [https://admin.google.com/ac/apps/unified](https://admin.google.com/ac/apps/unified)
|
Go to [https://admin.google.com/ac/apps/unified](https://admin.google.com/ac/apps/unified)
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
Press "DOWNLOAD METADATA" and save the file somewhere accessible by your LibreNMS server
|
Press "DOWNLOAD METADATA" and save the file somewhere accessible by your LibreNMS server
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
ACS URL = https://*your-librenms-url*/auth/saml2/callback
|
ACS URL = https://*your-librenms-url*/auth/saml2/callback
|
||||||
Entity ID = https://*your-librenms-url*/auth/saml2
|
Entity ID = https://*your-librenms-url*/auth/saml2
|
||||||
Name ID format = PERSISTANT
|
Name ID format = PERSISTANT
|
||||||
Name ID = Basic Information > Primary email
|
Name ID = Basic Information > Primary email
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
First name = http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname
|
First name = http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname
|
||||||
Last name = http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname
|
Last name = http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname
|
||||||
Primary email = http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress
|
Primary email = http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
!!! setting "auth/socialite"
|
!!! setting "auth/socialite"
|
||||||
```bash
|
```bash
|
||||||
lnms config:set auth.socialite.configs.saml2.metadata "$(cat /tmp/GoogleIDPMetadata.xml)"
|
lnms config:set auth.socialite.configs.saml2.metadata "$(cat /tmp/GoogleIDPMetadata.xml)"
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, you can copy the content of the file and run it like so, this will result in the exact same result as above.
|
Alternatively, you can copy the content of the file and run it like so, this will result in the exact same result as above.
|
||||||
!!! setting "auth/socialite"
|
!!! setting "auth/socialite"
|
||||||
```bash
|
```bash
|
||||||
lnms config:set auth.socialite.configs.saml2.metadata '''<?xml version="1.0" encoding
|
lnms config:set auth.socialite.configs.saml2.metadata '''<?xml version="1.0" encoding
|
||||||
...
|
...
|
||||||
...
|
...
|
||||||
</md:EntityDescriptor>'''
|
</md:EntityDescriptor>'''
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### Using an Identity Provider metadata URL
|
#### Using an Identity Provider metadata URL
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
This is the prefered and easiest way, if your IdP supports it!
|
This is the prefered and easiest way, if your IdP supports it!
|
||||||
|
|
||||||
!!! setting "auth/socialite"
|
!!! setting "auth/socialite"
|
||||||
```bash
|
```bash
|
||||||
lnms config:set auth.socialite.configs.saml2.metadata https://idp.co/metadata/xml
|
lnms config:set auth.socialite.configs.saml2.metadata https://idp.co/metadata/xml
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Using an Identity Provider metadata XML file
|
#### Using an Identity Provider metadata XML file
|
||||||
|
|
||||||
!!! setting "auth/socialite"
|
!!! setting "auth/socialite"
|
||||||
```bash
|
```bash
|
||||||
lnms config:set auth.socialite.configs.saml2.metadata "$(cat GoogleIDPMetadata.xml)"
|
lnms config:set auth.socialite.configs.saml2.metadata "$(cat GoogleIDPMetadata.xml)"
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Manually configuring the Identity Provider with a certificate string
|
#### Manually configuring the Identity Provider with a certificate string
|
||||||
|
|
||||||
!!! setting "auth/socialite"
|
!!! setting "auth/socialite"
|
||||||
```bash
|
```bash
|
||||||
lnms config:set auth.socialite.configs.saml2.acs https://idp.co/auth/acs
|
lnms config:set auth.socialite.configs.saml2.acs https://idp.co/auth/acs
|
||||||
lnms config:set auth.socialite.configs.saml2.entityid http://saml.to/trust
|
lnms config:set auth.socialite.configs.saml2.entityid http://saml.to/trust
|
||||||
lnms config:set auth.socialite.configs.saml2.certificate MIIC4jCCAcqgAwIBAgIQbDO5YO....
|
lnms config:set auth.socialite.configs.saml2.certificate MIIC4jCCAcqgAwIBAgIQbDO5YO....
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Manually configuring the Identity Provider with a certificate file
|
#### Manually configuring the Identity Provider with a certificate file
|
||||||
|
|
||||||
!!! setting "auth/socialite"
|
!!! setting "auth/socialite"
|
||||||
```bash
|
```bash
|
||||||
lnms config:set auth.socialite.configs.saml2.acs https://idp.co/auth/acs
|
lnms config:set auth.socialite.configs.saml2.acs https://idp.co/auth/acs
|
||||||
lnms config:set auth.socialite.configs.saml2.entityid http://saml.to/trust
|
lnms config:set auth.socialite.configs.saml2.entityid http://saml.to/trust
|
||||||
lnms config:set auth.socialite.configs.saml2.certificate "$(cat /path/to/certificate.pem)"
|
lnms config:set auth.socialite.configs.saml2.certificate "$(cat /path/to/certificate.pem)"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Add provider event listener
|
### Add provider event listener
|
||||||
|
|
||||||
Now we just need to define the listener service within LibreNMS:
|
Now we just need to define the listener service within LibreNMS:
|
||||||
|
|
||||||
!!! setting "auth/socialite"
|
!!! setting "auth/socialite"
|
||||||
```bash
|
```bash
|
||||||
lnms config:set auth.socialite.configs.saml2.listener "\SocialiteProviders\Saml2\Saml2ExtendSocialite"
|
lnms config:set auth.socialite.configs.saml2.listener "\SocialiteProviders\Saml2\Saml2ExtendSocialite"
|
||||||
```
|
```
|
||||||
|
|
||||||
### SESSION_SAME_SITE_COOKIE
|
### SESSION_SAME_SITE_COOKIE
|
||||||
|
|
||||||
You most likely will need to set `SESSION_SAME_SITE_COOKIE=none` in `.env` if you use SAML2!
|
You most likely will need to set `SESSION_SAME_SITE_COOKIE=none` in `.env` if you use SAML2!
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
Don't forget to run `lnms config:clear` after you modify `.env` to flush the config cache
|
Don't forget to run `lnms config:clear` after you modify `.env` to flush the config cache
|
||||||
|
|
||||||
### Service provider metadata
|
### Service provider metadata
|
||||||
|
|
||||||
Your identify provider might ask you for your Service Provider (SP) metadata.
|
Your identify provider might ask you for your Service Provider (SP) metadata.
|
||||||
LibreNMS exposes all of this information from your [LibreNMS install](https://*your-librenms-url*/auth/saml2/metadata)
|
LibreNMS exposes all of this information from your [LibreNMS install](https://*your-librenms-url*/auth/saml2/metadata)
|
||||||
|
|
||||||
|
|
||||||
@@ -393,9 +393,9 @@ LibreNMS exposes all of this information from your [LibreNMS install](https://*y
|
|||||||
If it doesn't work, please double check your configuration values by using the `config:get` command below.
|
If it doesn't work, please double check your configuration values by using the `config:get` command below.
|
||||||
|
|
||||||
!!! setting "auth/socialite"
|
!!! setting "auth/socialite"
|
||||||
```bash
|
```bash
|
||||||
lnms config:get auth.socialite
|
lnms config:get auth.socialite
|
||||||
```
|
```
|
||||||
|
|
||||||
### Redirect URL
|
### Redirect URL
|
||||||
If you have a need to, then you can override redirect url with the following commands:
|
If you have a need to, then you can override redirect url with the following commands:
|
||||||
@@ -411,7 +411,7 @@ If you have a need to, then you can override redirect url with the following com
|
|||||||
|
|
||||||
!!! setting "auth/socialite"
|
!!! setting "auth/socialite"
|
||||||
From here you can configure the settings for any identity providers you have configured along with some bespoke options.
|
From here you can configure the settings for any identity providers you have configured along with some bespoke options.
|
||||||
|
|
||||||
Redirect Login page: This setting will skip your LibreNMS login and take the end user straight to the first idP you configured.
|
Redirect Login page: This setting will skip your LibreNMS login and take the end user straight to the first idP you configured.
|
||||||
|
|
||||||
Allow registration via provider: If this setting is disabled, new users signing in via the idP will not be authenticated. This setting allows a local user to be automatically created which permits their login.
|
Allow registration via provider: If this setting is disabled, new users signing in via the idP will not be authenticated. This setting allows a local user to be automatically created which permits their login.
|
||||||
|
|||||||
@@ -57,11 +57,11 @@ class in 'app/Plugins/PluginName' and overload the hook methods.
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
{{ $device->hostname }}
|
{{ $device->hostname }}
|
||||||
<!-- Do you stuff here -->
|
<!-- Do you stuff here -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
```
|
```
|
||||||
@@ -71,7 +71,7 @@ class in 'app/Plugins/PluginName' and overload the hook methods.
|
|||||||
enabled. In this blade, you can do your work and display your
|
enabled. In this blade, you can do your work and display your
|
||||||
results in a frame.
|
results in a frame.
|
||||||
|
|
||||||
- menu.blade.php :: For a menu entry
|
- menu.blade.php :: For a menu entry
|
||||||
|
|
||||||
- page.blade.pho :: Here is a good place to add a own LibreNMS page without dependence with a device. A good place to create your own lists with special requirements and behavior.
|
- page.blade.pho :: Here is a good place to add a own LibreNMS page without dependence with a device. A good place to create your own lists with special requirements and behavior.
|
||||||
|
|
||||||
|
|||||||
@@ -110,16 +110,16 @@ On SELinux, you need to configure SELinux for SNMPd to communicate to LibreNMS:
|
|||||||
```
|
```
|
||||||
cat > snmptrap.te << EOF
|
cat > snmptrap.te << EOF
|
||||||
module snmptrap 1.0;
|
module snmptrap 1.0;
|
||||||
|
|
||||||
require {
|
require {
|
||||||
type httpd_sys_rw_content_t;
|
type httpd_sys_rw_content_t;
|
||||||
type snmpd_t;
|
type snmpd_t;
|
||||||
class file { append getattr open read };
|
class file { append getattr open read };
|
||||||
class capability dac_override;
|
class capability dac_override;
|
||||||
}
|
}
|
||||||
|
|
||||||
#============= snmpd_t ==============
|
#============= snmpd_t ==============
|
||||||
|
|
||||||
allow snmpd_t httpd_sys_rw_content_t:file { append getattr open read };
|
allow snmpd_t httpd_sys_rw_content_t:file { append getattr open read };
|
||||||
allow snmpd_t self:capability dac_override;
|
allow snmpd_t self:capability dac_override;
|
||||||
EOF
|
EOF
|
||||||
@@ -161,13 +161,13 @@ If you have configured logging of traps to ```/var/log/snmptrap/traps.log``` the
|
|||||||
|
|
||||||
```
|
```
|
||||||
2020-03-09 16:22:59 localhost [UDP: [127.0.0.1]:58942->[127.0.0.1]:162]:
|
2020-03-09 16:22:59 localhost [UDP: [127.0.0.1]:58942->[127.0.0.1]:162]:
|
||||||
SNMPv2-MIB::sysUpTime.0 = Timeticks: (149721964) 17 days, 7:53:39.64 SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-SMI::enterprises.8072.2.3.0.1 SNMPv2-SMI::enterprises.8072.2.3.2.1 = INTEGER: 123456
|
SNMPv2-MIB::sysUpTime.0 = Timeticks: (149721964) 17 days, 7:53:39.64 SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-SMI::enterprises.8072.2.3.0.1 SNMPv2-SMI::enterprises.8072.2.3.2.1 = INTEGER: 123456
|
||||||
```
|
```
|
||||||
|
|
||||||
and in LibreNMS your localhost device eventlog like:
|
and in LibreNMS your localhost device eventlog like:
|
||||||
|
|
||||||
```
|
```
|
||||||
2020-03-09 16:22:59 SNMP trap received: SNMPv2-SMI::enterprises.8072.2.3.0.1
|
2020-03-09 16:22:59 SNMP trap received: SNMPv2-SMI::enterprises.8072.2.3.0.1
|
||||||
```
|
```
|
||||||
|
|
||||||
### Why we need Uptime
|
### Why we need Uptime
|
||||||
|
|||||||
@@ -28,14 +28,14 @@ php includes/sql-schema/update.php
|
|||||||
|
|
||||||
## Disabling automatic updates
|
## Disabling automatic updates
|
||||||
|
|
||||||
LibreNMS by default performs updates on a daily basis.
|
LibreNMS by default performs updates on a daily basis.
|
||||||
This can be disabled in the WebUI Global Settings under System -> Updates, or using lnms
|
This can be disabled in the WebUI Global Settings under System -> Updates, or using lnms
|
||||||
|
|
||||||
!!! warning
|
!!! warning
|
||||||
You should never remove daily.sh from the cronjob!
|
You should never remove daily.sh from the cronjob!
|
||||||
This does database cleanup and other processes in addition to updating.
|
This does database cleanup and other processes in addition to updating.
|
||||||
|
|
||||||
!!! setting "settings/system/updates"
|
!!! setting "settings/system/updates"
|
||||||
```bash
|
```bash
|
||||||
lnms config:set update false
|
lnms config:set update false
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -50,10 +50,10 @@ In the table below you can find the values needed for devices which are already
|
|||||||
LibreNMS is ready for the devices listed in this table. You only need
|
LibreNMS is ready for the devices listed in this table. You only need
|
||||||
to configure your pCOweb card with the accorded System OID and Enterprise OID:
|
to configure your pCOweb card with the accorded System OID and Enterprise OID:
|
||||||
|
|
||||||
| Manufacturer | Description | System OID | Enterprise OID |
|
| Manufacturer | Description | System OID | Enterprise OID |
|
||||||
|-------------- |------------- |---------------------------- |---------------- |
|
|-------------- |------------- |---------------------------- |---------------- |
|
||||||
| Rittal | IT Chiller | 1.3.6.1.4.1.9839.2606.1 | 9839 |
|
| Rittal | IT Chiller | 1.3.6.1.4.1.9839.2606.1 | 9839 |
|
||||||
| Rittal | LCP DX 3311 | 1.3.6.1.4.1.9839.2606.3311 | 9839.2606 |
|
| Rittal | LCP DX 3311 | 1.3.6.1.4.1.9839.2606.3311 | 9839.2606 |
|
||||||
|
|
||||||
## Unsupported devices
|
## Unsupported devices
|
||||||
After constructing the correct System OID for your SNMP card, you can
|
After constructing the correct System OID for your SNMP card, you can
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ modules:
|
|||||||
oid: dewpoint
|
oid: dewpoint
|
||||||
num_oid: '.1.3.6.1.4.1.17095.2.1.5.{{ $index }}'
|
num_oid: '.1.3.6.1.4.1.17095.2.1.5.{{ $index }}'
|
||||||
descr: DewPoint
|
descr: DewPoint
|
||||||
index: '{{ $index }}'
|
index: '{{ $index }}'
|
||||||
state:
|
state:
|
||||||
data:
|
data:
|
||||||
-
|
-
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ modules:
|
|||||||
oid: whL1
|
oid: whL1
|
||||||
num_oid: .1.3.6.1.4.1.34278.3.1.{{ $index }}
|
num_oid: .1.3.6.1.4.1.34278.3.1.{{ $index }}
|
||||||
index: whL1.{{ $index }}
|
index: whL1.{{ $index }}
|
||||||
descr: 'L1'
|
descr: 'L1'
|
||||||
-
|
-
|
||||||
oid: whL2
|
oid: whL2
|
||||||
num_oid: .1.3.6.1.4.1.34278.3.2.{{ $index }}
|
num_oid: .1.3.6.1.4.1.34278.3.2.{{ $index }}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ modules:
|
|||||||
oid: whL1
|
oid: whL1
|
||||||
num_oid: .1.3.6.1.4.1.34278.4.1.{{ $index }}
|
num_oid: .1.3.6.1.4.1.34278.4.1.{{ $index }}
|
||||||
index: whL1.{{ $index }}
|
index: whL1.{{ $index }}
|
||||||
descr: 'L1'
|
descr: 'L1'
|
||||||
-
|
-
|
||||||
oid: whL2
|
oid: whL2
|
||||||
num_oid: .1.3.6.1.4.1.34278.4.2.{{ $index }}
|
num_oid: .1.3.6.1.4.1.34278.4.2.{{ $index }}
|
||||||
@@ -35,7 +35,7 @@ modules:
|
|||||||
num_oid: .1.3.6.1.4.1.34278.5.1.{{ $index }}
|
num_oid: .1.3.6.1.4.1.34278.5.1.{{ $index }}
|
||||||
index: wh3.{{ $index }}
|
index: wh3.{{ $index }}
|
||||||
group: 'Sum'
|
group: 'Sum'
|
||||||
descr: 'L1-L3'
|
descr: 'L1-L3'
|
||||||
-
|
-
|
||||||
oid: qh3
|
oid: qh3
|
||||||
num_oid: .1.3.6.1.4.1.34278.5.2.{{ $index }}
|
num_oid: .1.3.6.1.4.1.34278.5.2.{{ $index }}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
os: epson-projector
|
os: epson-projector
|
||||||
text: 'Epson Projector'
|
text: 'Epson Projector'
|
||||||
type: collaboration
|
type: collaboration
|
||||||
icon: epson
|
icon: epson
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ if ($components[$vars['poolid']]['type'] == 'f5-ltm-pool') {
|
|||||||
$graph_array['id'] = $vars['poolid'];
|
$graph_array['id'] = $vars['poolid'];
|
||||||
require 'includes/html/print-graphrow.inc.php'; ?>
|
require 'includes/html/print-graphrow.inc.php'; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel panel-default" id="connections">
|
<div class="panel panel-default" id="connections">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
|
|||||||
@@ -312,10 +312,10 @@
|
|||||||
"Disabled\/ignored": "Disabilitata\/Ignorata",
|
"Disabled\/ignored": "Disabilitata\/Ignorata",
|
||||||
"Show": "Mostra",
|
"Show": "Mostra",
|
||||||
"Hide": "Nascondi",
|
"Hide": "Nascondi",
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"Order By": "Ordinato per",
|
"Order By": "Ordinato per",
|
||||||
"Hostname": "Nome host",
|
"Hostname": "Nome host",
|
||||||
"Device group": "Gruppo di dispositivi",
|
"Device group": "Gruppo di dispositivi",
|
||||||
|
|||||||
@@ -335,16 +335,16 @@
|
|||||||
|
|
||||||
<li role="presentation" class="divider"></li>
|
<li role="presentation" class="divider"></li>
|
||||||
<li><a href="{{ url('port-groups') }}"><i class="fa fa-th fa-fw fa-lg" aria-hidden="true"></i> {{ __('Manage Groups') }} </a></li>
|
<li><a href="{{ url('port-groups') }}"><i class="fa fa-th fa-fw fa-lg" aria-hidden="true"></i> {{ __('Manage Groups') }} </a></li>
|
||||||
@if($port_groups->isNotEmpty())
|
@if($port_groups->isNotEmpty())
|
||||||
<li class="dropdown-submenu">
|
<li class="dropdown-submenu">
|
||||||
<a href="{{ url('port-groups') }}"><i class="fa fa-th fa-fw fa-lg" aria-hidden="true"></i> {{ __('Port Groups') }}</a>
|
<a href="{{ url('port-groups') }}"><i class="fa fa-th fa-fw fa-lg" aria-hidden="true"></i> {{ __('Port Groups') }}</a>
|
||||||
<ul class="dropdown-menu scrollable-menu">
|
<ul class="dropdown-menu scrollable-menu">
|
||||||
@foreach($port_groups as $group)
|
@foreach($port_groups as $group)
|
||||||
<li><a href="{{ url("ports/group=$group->id") }}" title="{{ $group->desc }}"><i class="fa fa-th fa-fw fa-lg" aria-hidden="true"></i> {{ ucfirst($group->name) }}</a></li>
|
<li><a href="{{ url("ports/group=$group->id") }}" title="{{ $group->desc }}"><i class="fa fa-th fa-fw fa-lg" aria-hidden="true"></i> {{ ucfirst($group->name) }}</a></li>
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<li role="presentation" class="divider"></li>
|
<li role="presentation" class="divider"></li>
|
||||||
@if($port_counts['alerted'])
|
@if($port_counts['alerted'])
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ This Document describes how to migrate the **traffic bills** from Observium to l
|
|||||||
* The librenms installation is complete and migration has taken place except for the traffic bills and traffic bill history.
|
* The librenms installation is complete and migration has taken place except for the traffic bills and traffic bill history.
|
||||||
* The old DB is called ``observium`` and new DB is called ``librenms``. If both DBs are not on the same DB Server, create a DB called ``observium`` on the target DB-Server run mysqldump & co to copy the data.
|
* The old DB is called ``observium`` and new DB is called ``librenms``. If both DBs are not on the same DB Server, create a DB called ``observium`` on the target DB-Server run mysqldump & co to copy the data.
|
||||||
* **No traffic bills** have been created in librenms.
|
* **No traffic bills** have been created in librenms.
|
||||||
* The scripts have been tested on librenms version Version 22.1.0 and DB Schema "2021_11_29_165436_improve_ports_search_index (229)"
|
* The scripts have been tested on librenms version Version 22.1.0 and DB Schema "2021_11_29_165436_improve_ports_search_index (229)"
|
||||||
|
|
||||||
### Precaution
|
### Precaution
|
||||||
backup your databases first:
|
backup your databases first:
|
||||||
@@ -25,35 +25,35 @@ LOCK TABLES librenms.bill_history librenms.bills librenms.bill_data WRITE, obser
|
|||||||
|
|
||||||
--
|
--
|
||||||
-- The columns bill_polled, bill_contact, bill_threshold and bill_notify are not present in the observium data model
|
-- The columns bill_polled, bill_contact, bill_threshold and bill_notify are not present in the observium data model
|
||||||
--
|
--
|
||||||
TRUNCATE TABLE librenms.bills;
|
TRUNCATE TABLE librenms.bills;
|
||||||
INSERT INTO librenms.bills
|
INSERT INTO librenms.bills
|
||||||
( bill_id, bill_name, bill_type, bill_cdr, bill_day, bill_quota, rate_95th_in, rate_95th_out, rate_95th, dir_95th, total_data, total_data_in, total_data_out, rate_average_in, rate_average_out, rate_average, bill_last_calc, bill_custid, bill_ref, bill_notes, bill_autoadded )
|
( bill_id, bill_name, bill_type, bill_cdr, bill_day, bill_quota, rate_95th_in, rate_95th_out, rate_95th, dir_95th, total_data, total_data_in, total_data_out, rate_average_in, rate_average_out, rate_average, bill_last_calc, bill_custid, bill_ref, bill_notes, bill_autoadded )
|
||||||
SELECT
|
SELECT
|
||||||
bill_id, bill_name, bill_type, bill_cdr, bill_day, bill_quota, rate_95th_in, rate_95th_out, rate_95th, dir_95th, total_data, total_data_in, total_data_out, rate_average_in, rate_average_out, rate_average, bill_last_calc, bill_custid, bill_ref, bill_notes, bill_autoadded
|
bill_id, bill_name, bill_type, bill_cdr, bill_day, bill_quota, rate_95th_in, rate_95th_out, rate_95th, dir_95th, total_data, total_data_in, total_data_out, rate_average_in, rate_average_out, rate_average, bill_last_calc, bill_custid, bill_ref, bill_notes, bill_autoadded
|
||||||
FROM observium.bills
|
FROM observium.bills
|
||||||
;
|
;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- the columns bill_peak_out, bill_peak_in are not present in the observium data model
|
-- the columns bill_peak_out, bill_peak_in are not present in the observium data model
|
||||||
--
|
--
|
||||||
TRUNCATE TABLE librenms.bill_history;
|
TRUNCATE TABLE librenms.bill_history;
|
||||||
INSERT INTO librenms.bill_history
|
INSERT INTO librenms.bill_history
|
||||||
( bill_hist_id, bill_id, updated, bill_datefrom, bill_dateto, bill_type, bill_allowed, bill_used, bill_overuse, bill_percent, rate_95th_in, rate_95th_out, rate_95th, dir_95th, rate_average, rate_average_in, rate_average_out, traf_in, traf_out, traf_total, pdf )
|
( bill_hist_id, bill_id, updated, bill_datefrom, bill_dateto, bill_type, bill_allowed, bill_used, bill_overuse, bill_percent, rate_95th_in, rate_95th_out, rate_95th, dir_95th, rate_average, rate_average_in, rate_average_out, traf_in, traf_out, traf_total, pdf )
|
||||||
SELECT
|
SELECT
|
||||||
bill_hist_id, bill_id, updated, bill_datefrom, bill_dateto, bill_type, bill_allowed, bill_used, bill_overuse, bill_percent, rate_95th_in, rate_95th_out, rate_95th, dir_95th, rate_average, rate_average_in, rate_average_out, traf_in, traf_out, traf_total, pdf
|
bill_hist_id, bill_id, updated, bill_datefrom, bill_dateto, bill_type, bill_allowed, bill_used, bill_overuse, bill_percent, rate_95th_in, rate_95th_out, rate_95th, dir_95th, rate_average, rate_average_in, rate_average_out, traf_in, traf_out, traf_total, pdf
|
||||||
FROM observium.bill_history
|
FROM observium.bill_history
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- There is a Primary key on bill_id and timestamp, to in case of duplicate primary keys we use the recorrd with the greatest bill_data.delta. ( see "ON DUPLICATE KEY UPDATE ...")
|
-- There is a Primary key on bill_id and timestamp, to in case of duplicate primary keys we use the recorrd with the greatest bill_data.delta. ( see "ON DUPLICATE KEY UPDATE ...")
|
||||||
--
|
--
|
||||||
SELECT COUNT(bill_id) FROM observium.bill_data;
|
SELECT COUNT(bill_id) FROM observium.bill_data;
|
||||||
TRUNCATE TABLE librenms.bill_data;
|
TRUNCATE TABLE librenms.bill_data;
|
||||||
INSERT INTO librenms.bill_data
|
INSERT INTO librenms.bill_data
|
||||||
( bill_id, timestamp, period, delta, in_delta, out_delta )
|
( bill_id, timestamp, period, delta, in_delta, out_delta )
|
||||||
SELECT
|
SELECT
|
||||||
bill_id, timestamp, period, delta, in_delta, out_delta from observium.bill_data
|
bill_id, timestamp, period, delta, in_delta, out_delta from observium.bill_data
|
||||||
ON DUPLICATE KEY UPDATE
|
ON DUPLICATE KEY UPDATE
|
||||||
librenms.bill_data.delta=
|
librenms.bill_data.delta=
|
||||||
@@ -86,9 +86,9 @@ Replay the data collecetd on observium since before the last copy, to avoid loos
|
|||||||
LOCK TABLES librenms.bill_data WRITE, observium.bill_data WRITE ;
|
LOCK TABLES librenms.bill_data WRITE, observium.bill_data WRITE ;
|
||||||
SELECT COUNT(bill_id) FROM observium.bill_data;
|
SELECT COUNT(bill_id) FROM observium.bill_data;
|
||||||
TRUNCATE TABLE librenms.bill_data;
|
TRUNCATE TABLE librenms.bill_data;
|
||||||
|
|
||||||
INSERT INTO librenms.bill_data
|
INSERT INTO librenms.bill_data
|
||||||
( bill_id, timestamp, period, delta, in_delta, out_delta )
|
( bill_id, timestamp, period, delta, in_delta, out_delta )
|
||||||
SELECT
|
SELECT
|
||||||
bill_id, timestamp, period, delta, in_delta, out_delta from observium.bill_data
|
bill_id, timestamp, period, delta, in_delta, out_delta from observium.bill_data
|
||||||
ON DUPLICATE KEY UPDATE
|
ON DUPLICATE KEY UPDATE
|
||||||
|
|||||||
Reference in New Issue
Block a user