2021-07-10 03:34:01 +08:00
# Configuration Docs
2021-06-09 10:49:38 -05:00
LibreNMS configuration is a set of key values.
2015-05-04 13:51:46 +01:00
2021-06-09 10:49:38 -05:00
The config is stored in two places:
Database: This applies to all pollers and can be set with either `lnms config:set` or in the Web UI. Database config takes precedence over config.php.
config.php: This applies to the local poller only. Configs set here will be disabled in the Web UI to prevent unexpected behaviour.
2015-05-04 13:51:46 +01:00
2021-06-09 10:49:38 -05:00
The LibreNMS uses dot notation for config items:
2021-06-17 03:16:21 +08:00
2021-06-09 10:49:38 -05:00
| Database | config.php |
| -------- | ---------- |
| `snmp.community` | `$config['snmp']['community']` |
| `snmp.community.+` | `$config['snmp']['community'][]` |
| `snmp.v3.0.authalgo` | `$config['snmp']['v3'][0]['authalgo']` |
2021-06-17 03:16:21 +08:00
> The documentation has not been updated to reflect using `lnms config:set` to
> set config items, but it will work for all settings. Not all settings have
> been defined in LibreNMS, but they can still be set with the `--ignore-checks`
> option. Without that option input is checked for correctness, that does not
> mean it is not possible to set bad values. Please report missing settings.
2021-06-09 10:49:38 -05:00
2021-07-10 03:34:01 +08:00
## CLI
2021-06-17 03:16:21 +08:00
`lnms config:get` will fetch the current config settings (composite of database, config.php, and defaults).
2021-06-09 10:49:38 -05:00
`lnms config:set` will set the config setting in the database. Calling `lnms config:set` on a setting with no value will reset it to the default value.
If you set up bash completion, you can use tab completion to find config settings.
2023-02-01 19:23:49 +02:00
### Getting a list of all current values
To get a complete list of all the current values, you can use the command `lnms config:get --dump` . The output may not be desirable, so you can use the `jq` package to pretty print it. Then it would be `lnms config:get --dump | jq` .
Example output:
```
librenms@librenms: ~$ lnms config:get --dump | jq
{
"install_dir": "/opt/librenms",
"active_directory": {
"users_purge": 0
},
"addhost_alwayscheckip": false,
"alert": {
"ack_until_clear": false,
"admins": true,
"default_copy": true,
"default_if_none": false,
"default_mail": false,
"default_only": true,
"disable": false,
"fixed-contacts": true,
"globals": true,
"syscontact": true,
"transports": {
"mail": 5
},
"tolerance_window": 5,
"users": false,
...
```
2021-07-10 03:34:01 +08:00
### Examples
2021-06-09 10:49:38 -05:00
```bash
lnms config:get snmp.community
2021-08-23 19:07:26 -05:00
[
"public"
]
2021-06-09 10:49:38 -05:00
lnms config:set snmp.community.+ testing
lnms config:get snmp.community
2021-08-23 19:07:26 -05:00
[
"public",
"testing"
]
2021-06-09 10:49:38 -05:00
lnms config:set snmp.community.0 private
lnms config:get snmp.community
2021-08-23 19:07:26 -05:00
[
"private",
"testing"
]
2021-06-09 10:49:38 -05:00
lnms config:set snmp.community test
Invalid format
lnms config:set snmp.community '["test", "othercommunity"]'
lnms config:get snmp.community
2021-08-23 19:07:26 -05:00
[
"test",
"othercommunity"
]
2021-06-09 10:49:38 -05:00
lnms config:set snmp.community
Reset snmp.community to the default? (yes/no) [no]:
> yes
2021-08-19 18:34:19 -05:00
lnms config:get snmp.community
2021-08-23 19:07:26 -05:00
[
"public"
]
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
2021-09-27 12:49:52 -05:00
## Pre-load configuration
This feature is primarily for docker images and other automation.
When installing LibreNMS for the first time with a new database you can place yaml key value files
in `database/seeders/config` to pre-populate the config database.
Example snmp.yaml
```yaml
snmp.community:
- public
- private
snmp.max_repeaters: 30
```
2021-06-09 10:49:38 -05:00
2021-07-10 03:34:01 +08:00
## Directories
2015-05-04 13:51:46 +01:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set temp_dir /tmp
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
The temporary directory is where images and other temporary files are
created on your filesystem.
2015-05-04 13:51:46 +01:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set log_dir /opt/librenms/logs
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
2015-05-04 13:51:46 +01:00
Log files created by LibreNMS will be stored within this directory.
2021-07-10 03:34:01 +08:00
## Database config
2015-08-09 14:36:31 +00:00
2021-08-23 19:07:26 -05:00
Set these variables either in .env (/opt/librenms/.env by default) or in the environment.
2015-08-09 14:36:31 +00:00
2019-05-22 13:31:24 -05:00
```dotenv
DB_HOST=127.0.0.1
DB_DATABASE=librenms
DB_USERNAME=DBUSER
DB_PASSWORD="DBPASS"
2015-08-09 14:36:31 +00:00
```
2019-05-22 13:31:24 -05:00
Use non-standard port:
2019-07-18 21:25:53 -05:00
2019-05-22 13:31:24 -05:00
```dotenv
DB_PORT=3306
```
Use a unix socket:
```dotenv
DB_SOCKET=/run/mysqld/mysqld.sock
2017-04-06 16:02:37 -05:00
```
2021-07-10 03:34:01 +08:00
## Core
2017-11-14 14:17:01 +00:00
2021-07-10 03:34:01 +08:00
### PHP Settings
2017-11-14 14:17:01 +00:00
2019-07-18 21:25:53 -05:00
You can change the memory limits for php within `config.php` . The
value is in Megabytes and should just be an int value:
2017-11-14 14:17:01 +00:00
2021-08-23 19:07:26 -05:00
`lnms config:set php_memory_limit 128`
2017-11-14 14:17:01 +00:00
2021-07-10 03:34:01 +08:00
### Programs
2015-05-04 13:51:46 +01:00
2019-07-18 21:25:53 -05:00
A lot of these are self explanatory so no further information may be
provided. Any extensions that have dedicated documentation page will
be linked to rather than having the config provided.
2017-02-23 22:45:50 +00:00
2021-07-10 03:34:01 +08:00
#### RRDTool
2017-02-23 22:45:50 +00:00
2019-07-18 21:25:53 -05:00
> You can configure these options within the WebUI now, please avoid
> setting these options within config.php
>
2017-02-23 22:45:50 +00:00
> Settings -> External Settings -> RRDTool Setup
2023-05-11 01:05:12 +01:00
!!! setting "external/binaries"
```bash
lnms config:set rrdtool /usr/bin/rrdtool
```
2015-05-04 13:51:46 +01:00
2019-07-18 21:25:53 -05:00
Please see [1 Minute polling ](1-Minute-Polling.md ) for information on
configuring your install to record data more frequently.
2021-07-10 03:34:01 +08:00
#### fping
2017-02-23 22:45:50 +00:00
2023-05-11 01:05:12 +01:00
!!! setting "external/binaries"
```bash
2021-08-23 19:07:26 -05:00
lnms config:set fping /usr/bin/fping
lnms config:set fping6 fping6
2023-05-11 01:05:12 +01:00
```
!!! setting "poller/ping"
```bash
lnms config:set fping_options.timeout 500
lnms config:set fping_options.count 3
lnms config:set fping_options.interval 500
lnms config:set fping_options.tos 184
```
2019-07-18 21:25:53 -05:00
2015-09-21 17:53:49 +02:00
`fping` configuration options:
2019-07-18 21:25:53 -05:00
* `timeout` (`fping` parameter `-t` ): Amount of time that fping waits
for a response to its first request (in milliseconds). **See note
below**
* `count` (`fping` parameter `-c` ): Number of request packets to send
to each target.
* `interval` (`fping` parameter `-p` ): Time in milliseconds that fping
waits between successive packets to an individual target.
2021-11-11 22:33:01 +01:00
* `tos` (`fping` parameter `-O` ): Set the type of service flag (TOS). Value can be either decimal or hexadecimal (0xh) format. Can be used to ensure that ping packets are queued in following QOS mecanisms in the network. Table is accessible in the [TOS Wikipedia page ](https://en.wikipedia.org/wiki/Type_of_service ).
2018-01-09 20:16:48 +00:00
2019-07-18 21:25:53 -05:00
> NOTE: Setting a higher timeout value than the interval value can
> lead to slowing down poller. Example:
2018-01-09 20:16:48 +00:00
>
> timeout: 3000
>
> count: 3
>
> interval: 500
>
2019-07-18 21:25:53 -05:00
> In this example, interval will be overwritten by the timeout value
> of 3000 which is 3 seconds. As we send three icmp packets (count:
> 3), each one is delayed by 3 seconds which will result in fping
> taking > 6 seconds to return results.
You can disable the fping / icmp check that is done for a device to be
determined to be up on a global or per device basis. **We don't advise
disabling the fping / icmp check unless you know the impact, at worst
if you have a large number of devices down then it's possible that the
poller would no longer complete in 5 minutes due to waiting for snmp
to timeout.**
2015-10-13 19:16:23 +00:00
Globally disable fping / icmp check:
2019-07-18 21:25:53 -05:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set icmp_check false
2015-10-13 19:16:23 +00:00
```
2019-07-18 21:25:53 -05:00
If you would like to do this on a per device basis then you can do so
under Device -> Edit -> Misc -> Disable ICMP Test? On
2021-07-10 03:34:01 +08:00
#### traceroute
2015-10-13 19:16:23 +00:00
2022-06-08 01:52:33 -05:00
LibreNMS uses traceroute to record debug information
2019-07-18 21:25:53 -05:00
when a device is down due to icmp AND you have
2021-08-23 19:07:26 -05:00
`lnms config:set debug.run_trace true` set.
2018-11-19 15:58:59 +00:00
2023-05-11 01:05:12 +01:00
!!! setting "external/binaries"
```bash
lnms config:set traceroute /usr/bin/traceroute
```
2018-11-19 15:58:59 +00:00
2021-07-10 03:34:01 +08:00
#### SNMP
2017-02-23 22:45:50 +00:00
2015-05-04 13:51:46 +01:00
SNMP program locations.
2023-05-11 01:05:12 +01:00
!!! setting "external/binaries"
```bash
lnms config:set snmpwalk /usr/bin/snmpwalk
lnms config:set snmpget /usr/bin/snmpget
lnms config:set snmpbulkwalk /usr/bin/snmpbulkwalk
lnms config:set snmpgetnext /usr/bin/snmpgetnext
lnms config:set snmptranslate /usr/bin/snmptranslate
```
#### Misc binaries
!!! setting "external/binaries"
2021-08-23 19:07:26 -05:00
```bash
lnms config:set whois /usr/bin/whois
lnms config:set ping /bin/ping
lnms config:set mtr /usr/bin/mtr
lnms config:set nmap /usr/bin/nmap
lnms config:set nagios_plugins /usr/lib/nagios/plugins
lnms config:set ipmitool /usr/bin/ipmitool
lnms config:set virsh /usr/bin/virsh
lnms config:set dot /usr/bin/dot
lnms config:set sfdp /usr/bin/sfdp
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
2021-07-10 03:34:01 +08:00
## Authentication
2019-04-22 19:01:39 -05:00
Generic Authentication settings.
2021-08-23 19:07:26 -05:00
Password minimum length for auth that allows user creation
```bash
lnms config:set password.min_length 8
2019-04-22 19:01:39 -05:00
```
2015-05-04 13:51:46 +01:00
2021-07-10 03:34:01 +08:00
## Proxy support
2016-10-14 02:07:07 +01:00
2019-07-18 21:25:53 -05:00
For alerting and the callback functionality, we support the use of a
http proxy setting. These can be any one of the following:
2016-10-14 02:07:07 +01:00
2023-05-11 01:05:12 +01:00
!!! setting "system/proxy"
```bash
lnms config:set callback_proxy proxy.domain.com
lnms config:set http_proxy proxy.domain.com
```
2016-10-14 02:07:07 +01:00
We can also make use of one of these environment variables which can be set in `/etc/environment` :
```bash
http_proxy=proxy.domain.com
https_proxy=proxy.domain.com
```
2021-07-10 03:34:01 +08:00
## RRDCached
2015-05-04 13:51:46 +01:00
2021-06-17 03:16:21 +08:00
Please refer to [RRDCached ](../Extensions/RRDCached.md )
2015-05-04 13:51:46 +01:00
2021-07-10 03:34:01 +08:00
## WebUI Settings
2015-05-04 13:51:46 +01:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set base_url http://demo.librenms.org
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
2015-05-04 13:51:46 +01:00
LibreNMS will attempt to detect the URL you are using but you can override that here.
2023-05-11 01:05:12 +01:00
!!! setting "webui/style"
```bash
lnms config:set site_style light
```
2019-07-18 21:25:53 -05:00
Currently we have a number of styles which can be set which will alter
the navigation bar look. dark, light and mono with light being the default.
2015-05-04 13:51:46 +01:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set webui.custom_css.+ css/custom/styles.css
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
You can override a large number of visual elements by creating your
own css stylesheet and referencing it here, place any custom css files
into `html/css/custom` so they will be ignored by auto updates. You
can specify as many css files as you like, the order they are within
your config will be the order they are loaded in the browser.
2015-05-04 13:51:46 +01:00
2023-05-11 01:05:12 +01:00
!!! setting "webui/style"
```bash
lnms config:set title_image images/custom/yourlogo.png
```
2019-07-18 21:25:53 -05:00
You can override the default logo with yours, place any custom images
files into `html/images/custom` so they will be ignored by auto updates.
2017-01-31 09:16:01 +01:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set page_refresh 300
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
Set how often pages are refreshed in seconds. The default is every 5
minutes. Some pages don't refresh at all by design.
2015-05-04 13:51:46 +01:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set front_page default
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
2020-04-01 06:03:02 +02:00
You can create your own front page by adding a blade file in `resources/views/overview/custom/`
and setting `front_page` to it's name.
For example, if you create `resources/views/overview/custom/foobar.blade.php` , set `front_page` to `foobar` .
2015-05-04 13:51:46 +01:00
2023-05-11 01:05:12 +01:00
!!! setting "webui/dashboard"
```bash
lnms config:set webui.default_dashboard_id 0
```
2019-07-18 21:25:53 -05:00
2016-08-23 12:37:12 -06:00
Allows the specification of a global default dashboard page for any user who
has not set one in their user preferences. Should be set to dashboard_id of an
existing dashboard that is shared or shared(read). Otherwise, the system will
automatically create each user an empty dashboard called `Default` on their
first login.
2021-08-23 19:07:26 -05:00
```bash
lnms config:set login_message "Unauthorised access or use shall render the user liable to criminal and/or civil prosecution."
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
2015-05-04 13:51:46 +01:00
This is the default message on the login page displayed to users.
2021-08-23 19:07:26 -05:00
```bash
lnms config:set public_status true
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
2015-05-04 13:51:46 +01:00
If this is set to true then an overview will be shown on the login page of devices and the status.
2021-08-23 19:07:26 -05:00
```bash
lnms config:set show_locations true # Enable Locations on menu
lnms config:set show_locations_dropdown true # Enable Locations dropdown on menu
lnms config:set show_services false # Disable Services on menu
lnms config:set int_customers true # Enable Customer Port Parsing
lnms config:set summary_errors false # Show Errored ports in summary boxes on the dashboard
lnms config:set customers_descr '["cust"]' # The description to look for in ifDescr. Can have multiple '["cust","cid"]'
lnms config:set transit_descr '["transit"]' # Add custom transit descriptions (array)
lnms config:set peering_descr '["peering"]' # Add custom peering descriptions (array)
lnms config:set core_descr '["core"]' # Add custom core descriptions (array)
lnms config:set custom_descr '["This is Custom"]' # Add custom interface descriptions (array)
lnms config:set int_transit true # Enable Transit Types
lnms config:set int_peering true # Enable Peering Types
lnms config:set int_core true # Enable Core Port Types
lnms config:set int_l2tp false # Disable L2TP Port Types
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
2015-05-04 13:51:46 +01:00
Enable / disable certain menus from being shown in the WebUI.
2019-07-18 21:25:53 -05:00
You are able to adjust the number and time frames of the quick select
time options for graphs and the mini graphs shown per row.
2017-08-25 21:11:01 +02:00
Quick select:
2019-07-18 21:25:53 -05:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set graphs.mini.normal '{
"day": "24 Hours",
"week": "One Week",
"month": "One Month",
"year": "One Year"
}'
lnms config:set graphs.mini.widescreen '{
"sixhour": "6 Hours",
"day": "24 Hours",
"twoday": "48 Hours",
"week": "One Week",
"twoweek": "Two Weeks",
"month": "One Month",
"twomonth": "Two Months",
"year": "One Year",
"twoyear": "Two Years"
}'
2017-08-25 21:11:01 +02:00
```
Mini graphs:
2019-07-18 21:25:53 -05:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set graphs.row.normal '{
"sixhour": "6 Hours",
"day": "24 Hours",
"twoday": "48 Hours",
"week": "One Week",
"twoweek": "Two Weeks",
"month": "One Month",
"twomonth": "Two Months",
"year": "One Year",
"twoyear": "Two Years"
}'
2017-08-25 21:11:01 +02:00
```
2021-08-23 19:07:26 -05:00
```bash
lnms config:set web_mouseover true
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
2016-09-12 17:22:34 +01:00
You can disable the mouseover popover for mini graphs by setting this to false.
2015-05-04 13:51:46 +01:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set enable_lazy_load true
2015-12-09 15:50:10 +00:00
```
2019-07-18 21:25:53 -05:00
2015-12-09 15:50:10 +00:00
You can disable image lazy loading by setting this to false.
2021-08-23 19:07:26 -05:00
```bash
lnms config:set overview_show_sysDescr true
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
2015-05-04 13:51:46 +01:00
Enable or disable the sysDescr output for a device.
2023-05-11 01:05:12 +01:00
!!! setting "webui/device"
```bash
lnms config:set device_display_default '{{ $hostname }}'
```
2019-07-18 21:25:53 -05:00
2022-07-27 17:29:54 -05:00
This is a simple template to control the display of device names by default.
You can override this setting per-device.
2019-07-18 21:25:53 -05:00
2022-07-27 17:29:54 -05:00
You may enter any free-form text including one or more of the following template replacements:
| Template | Replacement |
|-----------------------------|----------------------------------------------------------------------|
| `{{ $hostname }}` | The hostname or IP of the device that was set when added *default |
| `{{ $sysName_fallback }}` | The hostname or sysName if hostname is an IP |
| `{{ $sysName }}` | The SNMP sysName of the device, falls back to hostname/IP if missing |
| `{{ $ip }}` | The actual polled IP of the device, will not display a hostname |
2019-07-18 21:25:53 -05:00
2022-07-27 17:29:54 -05:00
For example, `{{ $sysName_fallback }} ({{ $ip }})` will display something like `server (192.168.1.1)`
2016-08-17 12:58:50 -03:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set device_traffic_iftype.+ '/loopback/'
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
Interface types that aren't graphed in the WebUI. The default array
2020-02-27 14:50:36 -06:00
contains more items, please see misc/config_definitions.json for the full list.
2015-05-04 13:51:46 +01:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set enable_clear_discovery true
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
Administrators are able to clear the last discovered time of a device
which will force a full discovery run within the configured 5 minute cron window.
2015-05-04 13:51:46 +01:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set enable_footer true
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
2015-05-04 13:51:46 +01:00
Disable the footer of the WebUI by setting `enable_footer` to 0.
2019-07-18 21:25:53 -05:00
You can enable the old style network map (only available for
individual devices with links discovered via xDP) by setting:
2021-08-23 19:07:26 -05:00
```bash
lnms config:set gui.network-map.style old
2016-06-08 09:23:43 +01:00
```
2015-08-01 18:14:55 +00:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set percentile_value 90
2017-10-11 20:21:11 +08:00
```
2019-07-18 21:25:53 -05:00
2017-10-11 20:21:11 +08:00
Show the `X` th percentile in the graph instead of the default 95th percentile.
2023-05-11 01:05:12 +01:00
!!! setting "webui/graph"
```bash
lnms config:set shorthost_target_length 15
```
2019-07-18 21:25:53 -05:00
2017-11-09 20:47:52 +00:00
The target maximum hostname length when applying the shorthost() function.
You can increase this if you want to try and fit more of the hostname in graph titles.
2019-07-18 21:25:53 -05:00
The default value is 12 However, this can possibly break graph
generation if this is very long.
2017-11-09 20:47:52 +00:00
2019-07-18 21:25:53 -05:00
You can enable dynamic graphs within the WebUI under Global Settings
-> Webui Settings -> Graph Settings.
2018-08-29 15:25:16 +02:00
Graphs will be movable/scalable without reloading the page:

2019-07-18 21:25:53 -05:00
## Stacked Graphs
You can enable stacked graphs instead of the default inverted
graphs. Enabling them is possible via webui Global Settings -> Webui
Settings -> Graph settings -> Use stacked graphs
## Add host settings
The following setting controls how hosts are added. If a host is
added as an ip address it is checked to ensure the ip is not already
present. If the ip is present the host is not added. If host is added
by hostname this check is not performed. If the setting is true
hostnames are resolved and the check is also performed. This helps
prevents accidental duplicate hosts.
2017-12-02 22:28:03 +02:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set addhost_alwayscheckip false # true - check for duplicate ips even when adding host by name.
2021-06-17 03:16:21 +08:00
# false- only check when adding host by ip.
2015-07-14 22:23:20 +02:00
```
2019-07-18 21:25:53 -05:00
By default we allow hosts to be added with duplicate sysName's, you
can disable this with the following config:
2016-05-02 20:20:29 +00:00
2023-05-11 01:05:12 +01:00
!!! setting "discovery/general"
2021-08-23 19:07:26 -05:00
```bash
lnms config:set allow_duplicate_sysName false
2016-05-02 20:20:29 +00:00
```
2021-07-10 03:34:01 +08:00
## Global poller and discovery modules
2019-07-18 21:25:53 -05:00
2021-08-19 10:32:08 -05:00
Enable or disable discovery or poller modules.
2017-10-21 17:51:28 -05:00
2021-08-19 10:32:08 -05:00
This setting has an order of precedence Device > OS > Global.
So if the module is set at a more specific level, it will override the
less specific settings.
Global:
```bash
lnms config:set discovery_modules.arp-table false
lnms config:set discovery_modules.entity-state true
lnms config:set poller_modules.entity-state true
```
Per OS:
```bash
lnms config:set os.ios.discovery_modules.arp-table false
lnms config:set os.ios.discovery_modules.entity-state true
lnms config:set os.ios.poller_modules.entity-state true
2017-10-21 17:51:28 -05:00
```
2021-07-10 03:34:01 +08:00
## SNMP Settings
2015-05-04 13:51:46 +01:00
2019-07-18 21:25:53 -05:00
Default SNMP options including retry and timeout settings and also
default version and port.
2019-01-16 07:47:24 +01:00
2023-05-11 01:05:12 +01:00
!!! setting "poller/snmp"
```bash
lnms config:set snmp.timeout 1 # timeout in seconds
lnms config:set snmp.retries 5 # how many times to retry the query
lnms config:set snmp.transports '["udp", "udp6", "tcp", "tcp6"]' # Transports to use
lnms config:set snmp.version '["v2c", "v3", "v1"]' # Default versions to use
lnms config:set snmp.port 161 # Default port
lnms config:set snmp.exec_timeout 1200 # execution time limit in seconds
```
2019-01-16 07:47:24 +01:00
2021-06-17 03:16:21 +08:00
> NOTE: `timeout` is the time to wait for an answer and `exec_timeout`
> is the max time to run a query.
2019-07-18 21:25:53 -05:00
The default v1/v2c snmp community to use, you can expand this array
with `[1]` , `[2]` , `[3]` , etc.
2015-05-04 13:51:46 +01:00
2023-05-11 01:05:12 +01:00
!!! setting "poller/snmp"
```bash
lnms config:set snmp.community.0 public
```
2019-12-18 16:14:33 +05:30
>NOTE: This list of SNMP communities is used for auto discovery, and as a default set for any manually added device.
2019-01-16 07:47:24 +01:00
2019-07-18 21:25:53 -05:00
The default v3 snmp details to use, you can expand this array with
`[1]` , `[2]` , `[3]` , etc.
2015-05-04 13:51:46 +01:00
2023-05-11 01:05:12 +01:00
!!! setting "poller/snmp"
```bash
lnms config:set snmp.v3.0 '{
authlevel: "noAuthNoPriv",
authname: "root",
authpass: "",
authalgo: "MD5",
cryptopass: "",
cryptoalgo: "AES"
}'
```
2021-08-23 19:07:26 -05:00
```
authlevel noAuthNoPriv | authNoPriv | authPriv
authname User Name (required even for noAuthNoPriv)
authpass Auth Passphrase
authalgo MD5 | SHA | SHA-224 | SHA-256 | SHA-384 | SHA-512
cryptopass Privacy (Encryption) Passphrase
cryptoalgo AES | AES-192 | AES-256 | AES-256-C | DES
2015-05-04 13:51:46 +01:00
```
2021-07-10 03:34:01 +08:00
## Auto discovery settings
2015-05-04 13:51:46 +01:00
2021-06-17 03:16:21 +08:00
Please refer to [Auto-Discovery ](../Extensions/Auto-Discovery.md )
2015-10-20 16:12:03 +00:00
2021-07-10 03:34:01 +08:00
## Email configuration
2015-05-04 13:51:46 +01:00
2019-07-18 21:25:53 -05:00
> You can configure these options within the WebUI now, please avoid
> setting these options within config.php
2015-05-25 21:51:27 +01:00
2023-05-11 01:05:12 +01:00
!!! setting "alerting/email"
```bash
lnms config:set email_backend mail
lnms config:set email_from librenms@yourdomain .local
lnms config:set email_user `lnms config:get project_id`
lnms config:set email_sendmail_path /usr/sbin/sendmail
lnms config:set email_smtp_host localhost
lnms config:set email_smtp_port 25
lnms config:set email_smtp_timeout 10
lnms config:set email_smtp_secure tls
lnms config:set email_smtp_auth false
lnms config:set email_smtp_username NULL
lnms config:set email_smtp_password NULL
```
2015-05-04 13:51:46 +01:00
2019-07-18 21:25:53 -05:00
What type of mail transport to use for delivering emails. Valid
options for `email_backend` are mail, sendmail or smtp. The varying
options after that are to support the different transports.
2021-07-10 03:34:01 +08:00
## Alerting
2015-05-04 13:51:46 +01:00
2021-06-17 03:16:21 +08:00
Please refer to [Alerting ](../Alerting/index.md )
2015-05-04 13:51:46 +01:00
2021-07-10 03:34:01 +08:00
## Billing
2015-05-04 13:51:46 +01:00
2021-06-17 03:16:21 +08:00
Please refer to [Billing ](../Extensions/Billing-Module.md )
2015-05-04 13:51:46 +01:00
2021-07-10 03:34:01 +08:00
## Global module support
2015-05-04 13:51:46 +01:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set enable_syslog false # Enable Syslog
lnms config:set enable_inventory true # Enable Inventory
lnms config:set enable_pseudowires true # Enable Pseudowires
lnms config:set enable_vrfs true # Enable VRFs
2015-05-04 13:51:46 +01:00
```
2021-07-10 03:34:01 +08:00
## Port extensions
2015-05-04 13:51:46 +01:00
2022-02-09 00:02:28 +01:00
Please refer to [Port-Description-Parser ](../Extensions/Interface-Description-Parsing.md )
2015-05-04 13:51:46 +01:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set enable_ports_etherlike false
lnms config:set enable_ports_junoseatmvp false
lnms config:set enable_ports_poe false
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
2015-05-04 13:51:46 +01:00
Enable / disable additional port statistics.
2021-08-24 20:28:18 +02:00
## Port Group
Assign a new discovered Port automatically to Port Group with this Port Group ID
(0 means no Port Group assignment)
2023-05-11 01:05:12 +01:00
!!! setting "discovery/networks"
```bash
lnms config:set default_port_group 0
```
2021-08-24 20:28:18 +02:00
2021-07-10 03:34:01 +08:00
## External integration
2015-05-04 13:51:46 +01:00
2021-07-10 03:34:01 +08:00
### Rancid
2017-02-26 14:44:21 +01:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set rancid_configs.+ /var/lib/rancid/network/configs/
lnms config:set rancid_repo_type svn
lnms config:set rancid_ignorecomments false
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
Rancid configuration, `rancid_configs` is an array containing all of
the locations of your rancid files. Setting `rancid_ignorecomments`
will disable showing lines that start with #
2021-07-10 03:34:01 +08:00
### Oxidized
2015-05-06 22:57:31 +01:00
2021-06-17 03:16:21 +08:00
Please refer to [Oxidized ](../Extensions/Oxidized.md )
2015-05-06 22:57:31 +01:00
2021-07-10 03:34:01 +08:00
### CollectD
2019-07-18 21:25:53 -05:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set collectd_dir /var/lib/collectd/rrd
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
Specify the location of the collectd rrd files. Note that the location
in config.php should be consistent with the location set in
/etc/collectd.conf and etc/collectd.d/rrdtool.conf
2018-08-27 16:08:31 -04:00
2021-08-23 19:07:26 -05:00
```bash
2018-08-27 16:08:31 -04:00
<Plugin rrdtool>
DataDir "/var/lib/collectd/rrd"
CreateFilesAsync false
CacheTimeout 120
CacheFlush 900
WritesPerSecond 50
</Plugin>
```
2019-07-18 21:25:53 -05:00
2018-08-27 16:08:31 -04:00
/etc/collectd.conf
2021-08-23 19:07:26 -05:00
```bash
2018-08-27 16:08:31 -04:00
LoadPlugin rrdtool
<Plugin rrdtool>
DataDir "/var/lib/collectd/rrd"
CacheTimeout 120
CacheFlush 900
</Plugin>
```
2019-07-18 21:25:53 -05:00
2018-08-27 16:08:31 -04:00
/etc/collectd.d/rrdtool.conf
2015-05-04 13:51:46 +01:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set collectd_sock unix:///var/run/collectd.sock
2015-07-16 11:14:02 -04:00
```
2019-07-18 21:25:53 -05:00
Specify the location of the collectd unix socket. Using a socket
allows the collectd graphs to be flushed to disk before being
drawn. Be sure that your web server has permissions to write to this socket.
2021-07-10 03:34:01 +08:00
### Smokeping
2015-05-04 13:51:46 +01:00
2021-06-17 03:16:21 +08:00
Please refer to [Smokeping ](../Extensions/Smokeping.md )
2015-12-29 07:14:34 +10:00
2021-07-10 03:34:01 +08:00
### NFSen
2015-12-29 07:10:15 +10:00
2021-06-17 03:16:21 +08:00
Please refer to [NFSen ](../Extensions/NFSen.md )
2015-05-04 13:51:46 +01:00
2023-03-19 03:07:52 +00:00
### Location parsing
LibreNMS can interpret sysLocation information and map the device loction based on GeoCoordinates or GeoCoding information.
- Info-keywords
- `[]` contains optional Latitude and Longitude information if manual GeoCoordinate positioning is desired.
- `()` contains optional information that is ignored during GeoCoding lookups.
#### **GeoCoordinates**
If device sysLocation information contains [lat, lng] (note the comma and square brackets), that is used to determin the GeoCoordinates.
Example:
```bash
name_that_can_not_be_looked_up [40.424521, -86.912755]
```
#### **GeoCoding**
Next it will attempt to look up the sysLocation with a map engine provided you have configured one under $config['geoloc']['engine']. The information has to be accurate or no result is returned, when it does it will ignore any information inside parentheses, allowing you to add details that would otherwise interfeeer with the lookup.
Example:
```bash
1100 Congress Ave, Austin, TX 78701 (3rd floor)
Geocoding lookup is:
1100 Congress Ave, Austin, TX 78701
```
#### **Overrides**
1. You can overwrite each device sysLocation information in the webGUI under "Device settings".
2. You can overwrite the location coordinates n in the webGUI under Device>GEO Locations
2021-07-10 03:34:01 +08:00
### Location mapping
2015-05-04 13:51:46 +01:00
2019-07-18 21:25:53 -05:00
If you just want to set GPS coordinates on a location, you should
visit Devices > Geo Locations > All Locations and edit the coordinates
there.
2019-01-19 16:58:24 -06:00
2016-02-09 19:02:38 +00:00
Exact Matching:
2019-07-18 21:25:53 -05:00
2021-08-23 19:07:26 -05:00
```bash
2022-11-17 23:43:41 -06:00
lnms config:set location_map '{"Under the Sink": "Under The Sink, The Office, London, UK"}'
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
2016-02-09 19:02:38 +00:00
Regex Matching:
2019-07-18 21:25:53 -05:00
2021-08-23 19:07:26 -05:00
```bash
2022-11-17 23:43:41 -06:00
lnms config:set location_map_regex '{"/Sink/": "Under The Sink, The Office, London, UK"}'
2016-02-09 19:02:38 +00:00
```
2019-07-18 21:25:53 -05:00
2017-04-24 15:06:22 -04:00
Regex Match Substitution:
2019-07-18 21:25:53 -05:00
2021-08-23 19:07:26 -05:00
```bash
2022-11-17 23:43:41 -06:00
lnms config:set location_map_regex_sub '{"/Sink/": "Under The Sink, The Office, London, UK [lat, long]"}'
2017-04-24 15:06:22 -04:00
```
2019-07-18 21:25:53 -05:00
If you have an SNMP SysLocation of "Rack10,Rm-314,Sink", Regex Match
Substition yields "Rack10,Rm-314,Under The Sink, The Office, London,
UK [lat, long]". This allows you to keep the SysLocation string short
and keeps Rack/Room/Building information intact after the substitution.
The above are examples, these will rewrite device snmp locations so
you don't need to configure full location within snmp.
2015-05-04 13:51:46 +01:00
2021-07-10 03:34:01 +08:00
## Interfaces to be ignored
2015-05-04 13:51:46 +01:00
2021-06-17 03:16:21 +08:00
Interfaces can be automatically ignored during discovery by modifying
bad_if\* entries in a default array, unsetting a default array and
customizing it, or creating an OS specific array. The preferred method
for ignoring interfaces is to use an OS specific array. The default
arrays can be found in misc/config_definitions.json. OS specific
definitions (includes/definitions/\_specific_os_.yaml) can contain
bad_if\* arrays, but should only be modified via pull-request as
manipulation of the definition files will block updating:
2020-02-27 14:50:36 -06:00
2017-02-08 00:04:44 +00:00
Examples:
2020-02-27 14:50:36 -06:00
**Add entries to default arrays**
2021-08-23 19:07:26 -05:00
```bash
lnms config:set bad_if.+ voip-null
lnms config:set bad_iftype.+ voiceEncap
lnms config:set bad_if_regexp.+ '/^lo[0-9].*/' # loopback
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
2021-08-23 19:07:26 -05:00
**Override default bad_if values**
```bash
lnms config:set bad_if '["voip-null", "voiceEncap", "voiceFXO"]'
2020-02-27 14:50:36 -06:00
```
**Create an OS specific array**
2021-08-23 19:07:26 -05:00
```bash
lnms config:set os.iosxe.bad_iftype.+ macSecControlledIF
lnms config:set os.iosxe.bad_iftype.+ macSecUncontrolledIF
2020-02-27 14:50:36 -06:00
```
**Various bad_if\* selection options available**
2017-02-08 00:04:44 +00:00
2015-05-04 13:51:46 +01:00
`bad_if` is matched against the ifDescr value.
2017-02-08 00:04:44 +00:00
2015-05-04 13:51:46 +01:00
`bad_iftype` is matched against the ifType value.
2017-02-08 00:04:44 +00:00
2015-05-04 13:51:46 +01:00
`bad_if_regexp` is matched against the ifDescr value as a regular expression.
2017-02-08 00:04:44 +00:00
2016-04-28 15:36:13 -07:00
`bad_ifname_regexp` is matched against the ifName value as a regular expression.
2017-02-08 00:04:44 +00:00
2016-04-28 15:36:13 -07:00
`bad_ifalias_regexp` is matched against the ifAlias value as a regular expression.
2015-05-04 13:51:46 +01:00
2021-07-10 03:34:01 +08:00
## Interfaces that shouldn't be ignored
2017-05-05 21:18:33 +01:00
Examples:
2021-08-23 19:07:26 -05:00
```bash
lnms config:set good_if.+ FastEthernet
lnms config:set os.ios.good_if.+ FastEthernet
2017-05-05 21:18:33 +01:00
```
2019-07-18 21:25:53 -05:00
`good_if` is matched against ifDescr value. This can be a bad_if value
2021-06-17 03:16:21 +08:00
as well which would stop that port from being ignored. i.e. if bad_if
2019-07-18 21:25:53 -05:00
and good_if both contained FastEthernet then ports with this value in
the ifDescr will be valid.
2017-05-05 21:18:33 +01:00
2021-07-10 03:34:01 +08:00
## Interfaces to be rewritten
2015-05-09 12:33:11 +00:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set rewrite_if '{"cpu": "Management Interface"}'
lnms config:set rewrite_if_regexp '{"/cpu /": "Management "}'
2015-05-09 12:33:11 +00:00
```
2019-07-18 21:25:53 -05:00
2015-05-09 12:33:11 +00:00
Entries defined in `rewrite_if` are being replaced completely.
Entries defined in `rewrite_if_regexp` only replace the match.
Matches are compared case-insensitive.
2021-07-10 03:34:01 +08:00
## Entity sensors to be ignored
2016-01-25 22:59:11 +00:00
2019-07-18 21:25:53 -05:00
Some devices register bogus sensors as they are returned via SNMP but
either don't exist or just don't return data. This allows you to
ignore those based on the descr field in the database. You can either
ignore globally or on a per os basis.
2016-01-25 22:59:11 +00:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set bad_entity_sensor_regex.+ '/Physical id [0-9]+/'
lnms config:set os.ios.bad_entity_sensor_regex '["/Physical id [0-9]+/"]'
2016-01-25 22:59:11 +00:00
```
2021-07-10 03:34:01 +08:00
## Entity sensors limit values
2019-03-16 11:51:09 +01:00
2019-07-18 21:25:53 -05:00
Vendors may give some limit values (or thresholds) for the discovered
sensors. By default, when no such value is given, both high and low
limit values are guessed, based on the value measured during the initial discovery.
When it is preferred to have no high and/or low limit values at all if
these are not provided by the vendor, the guess method can be disabled:
2019-03-16 11:51:09 +01:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set sensors.guess_limits false
2019-03-16 11:51:09 +01:00
```
2021-07-10 03:34:01 +08:00
## Ignoring Health Sensors
2019-08-08 03:01:58 +02:00
It is possible to filter some sensors from the configuration:
2019-10-21 02:47:40 +02:00
* Ignore all temperature sensors
2019-08-08 03:01:58 +02:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set disabled_sensors.current true
2019-08-08 03:01:58 +02:00
```
2019-10-21 02:47:40 +02:00
* Filter all sensors matching regexp ```'/PEM Iout/'` ``.
2019-08-08 03:01:58 +02:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set disabled_sensors_regex.+ '/PEM Iout/'
2019-08-08 03:01:58 +02:00
```
2019-10-21 02:47:40 +02:00
* Filter all 'current' sensors for Operating System 'vrp'.
2019-08-08 03:01:58 +02:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set os.vrp.disabled_sensors.current true
2019-08-08 03:01:58 +02:00
```
2019-10-21 02:47:40 +02:00
* Filter all sensors matching regexp ```'/PEM Iout/'` `` for Operating System iosxe.
2019-08-08 03:01:58 +02:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set os.iosxe.disabled_sensors_regex '/PEM Iout/'
2019-08-08 03:01:58 +02:00
```
2021-07-10 03:34:01 +08:00
## Storage configuration
2015-05-04 13:51:46 +01:00
2019-03-16 23:53:05 +01:00
Mounted storage / mount points to ignore in discovery and polling.
2019-07-18 21:25:53 -05:00
2023-05-11 01:05:12 +01:00
!!! setting "discovery/storage"
```bash
lnms config:set ignore_mount_removable true
lnms config:set ignore_mount_network true
lnms config:set ignore_mount_optical true
lnms config:set ignore_mount.+ /kern
lnms config:set ignore_mount.+ /mnt/cdrom
lnms config:set ignore_mount.+ /proc
lnms config:set ignore_mount.+ /dev
lnms config:set ignore_mount_string.+ packages
lnms config:set ignore_mount_string.+ devfs
lnms config:set ignore_mount_string.+ procfs
lnms config:set ignore_mount_string.+ UMA
lnms config:set ignore_mount_string.+ MALLOC
lnms config:set ignore_mount_regexp.+ '/on: \/packages/'
lnms config:set ignore_mount_regexp.+ '/on: \/dev/'
lnms config:set ignore_mount_regexp.+ '/on: \/proc/'
lnms config:set ignore_mount_regexp.+ '/on: \/junos^/'
lnms config:set ignore_mount_regexp.+ '/on: \/junos\/dev/'
lnms config:set ignore_mount_regexp.+ '/on: \/jail\/dev/'
lnms config:set ignore_mount_regexp.+ '/^(dev|proc)fs/'
lnms config:set ignore_mount_regexp.+ '/^\/dev\/md0/'
lnms config:set ignore_mount_regexp.+ '/^\/var\/dhcpd\/dev,/'
lnms config:set ignore_mount_regexp.+ '/UMA/'
```
2019-03-16 23:53:05 +01:00
Custom storage warning percentage
2019-07-18 21:25:53 -05:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set storage_perc_warn 60
2019-03-16 23:53:05 +01:00
```
2015-05-04 13:51:46 +01:00
2021-07-10 03:34:01 +08:00
## IRC Bot
2015-05-04 13:51:46 +01:00
2021-06-17 03:16:21 +08:00
Please refer to [IRC Bot ](../Extensions/IRC-Bot.md )
2015-05-04 13:51:46 +01:00
2021-07-10 03:34:01 +08:00
## Authentication
2015-05-04 13:51:46 +01:00
2021-06-17 03:16:21 +08:00
Please refer to [Authentication ](../Extensions/Authentication.md )
2015-05-04 13:51:46 +01:00
2021-07-10 03:34:01 +08:00
## Cleanup options
2015-05-04 13:51:46 +01:00
2021-07-25 15:50:25 +08:00
Please refer to [Cleanup Options ](../Support/Cleanup-options.md )
2016-08-01 18:56:50 +01:00
2021-07-10 03:34:01 +08:00
## Syslog options
2015-05-04 13:51:46 +01:00
2021-06-17 03:16:21 +08:00
Please refer to [Syslog ](../Extensions/Syslog.md )
2015-05-04 13:51:46 +01:00
2021-07-10 03:34:01 +08:00
## Virtualization
2015-05-04 13:51:46 +01:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set enable_libvirt true
lnms config:set libvirt_protocols '["qemu+ssh","xen+ssh"]'
lnms config:set libvirt_username root
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
2015-06-13 09:38:19 +10:00
Enable this to switch on support for libvirt along with `libvirt_protocols`
to indicate how you connect to libvirt. You also need to:
2019-07-18 21:25:53 -05:00
1. Generate a non-password-protected ssh key for use by LibreNMS, as the
2015-06-13 09:38:19 +10:00
user which runs polling & discovery (usually `librenms` ).
2019-07-18 21:25:53 -05:00
1. On each VM host you wish to monitor:
1. Configure public key authentication from your LibreNMS server/poller by
adding the librenms public key to `~root/.ssh/authorized_keys` .
1. (xen+ssh only) Enable libvirtd to gather data from xend by setting
`(xend-unix-server yes)` in `/etc/xen/xend-config.sxp` and
restarting xend and libvirtd.
2015-06-13 09:38:19 +10:00
To test your setup, run `virsh -c qemu+ssh://vmhost/system list` or
`virsh -c xen+ssh://vmhost list` as your librenms polling user.
2016-01-30 21:06:58 -05:00
2021-07-10 03:34:01 +08:00
## BGP Support
2015-05-04 13:51:46 +01:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set astext.65332 "Cymru FullBogon Feed"
2015-05-04 13:51:46 +01:00
```
2019-07-18 21:25:53 -05:00
2015-05-04 13:51:46 +01:00
You can use this array to rewrite the description of ASes that you have discovered.
2021-07-10 03:34:01 +08:00
## Auto updates
2015-05-04 13:51:46 +01:00
2021-06-17 03:16:21 +08:00
Please refer to [Updating ](../General/Updating.md )
2015-05-04 13:51:46 +01:00
2021-07-10 03:34:01 +08:00
## IPMI
2019-07-18 21:25:53 -05:00
Setup the types of IPMI protocols to test a host for and in what
order. Don't forget to install ipmitool on the monitoring host.
2015-05-13 09:22:55 +02:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set ipmi.type '["lanplus", "lan", "imb", "open"]'
2015-05-13 09:22:55 +02:00
```
2021-07-10 03:34:01 +08:00
## Distributed poller settings
2015-05-04 13:51:46 +01:00
2021-06-17 03:16:21 +08:00
Please refer to [Distributed Poller ](../Extensions/Distributed-Poller.md )
2017-09-21 18:07:31 +01:00
2021-07-10 03:34:01 +08:00
## API Settings
2019-07-18 21:25:53 -05:00
2021-07-10 03:34:01 +08:00
## CORS Support
2017-09-21 18:07:31 +01:00
2019-07-18 21:25:53 -05:00
<https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS>
2017-09-21 18:07:31 +01:00
2019-07-18 21:25:53 -05:00
CORS support for the API is disabled by default. Below you will find
the standard options, all of which you can configure.
2017-09-21 18:07:31 +01:00
2021-08-23 19:07:26 -05:00
```bash
lnms config:set api.cors.enabled false
lnms config:set api.cors.origin '["*"]'
lnms config:set api.cors.maxage '86400'
lnms config:set api.cors.allowmethods '["POST", "GET", "PUT", "DELETE", "PATCH"]'
lnms config:set api.cors.allowheaders '["Origin", "X-Requested-With", "Content-Type", "Accept", "X-Auth-Token"]'
lnms config:set api.cors.exposeheaders '["Cache-Control", "Content-Language", "Content-Type", "Expires", "Last-Modified", "Pragma"]'
lnms config:set api.cors.allowmethods '["POST", "GET", "PUT", "DELETE", "PATCH"]'
lnms config:set api.cors.allowheaders '["Origin", "X-Requested-With", "Content-Type", "Accept", "X-Auth-Token"]'
lnms config:set api.cors.exposeheaders '["Cache-Control", "Content-Language", "Content-Type", "Expires", "Last-Modified", "Pragma"]'
lnms config:set api.cors.allowcredentials false
2017-09-21 18:07:31 +01:00
```