mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 16:04:35 +02:00
Merge branch 'master' of https://github.com/adaniels21487/librenms into issue-1650
Conflicts: html/api_v0.php html/includes/api_functions.inc.php
This commit is contained in:
@@ -20,6 +20,10 @@
|
||||
- [`add_device`](#api-route-11)
|
||||
- [`list_oxidized`](#api-route-21)
|
||||
- [`update_device_field`](#api-route-update_device_field)
|
||||
- [`get_device_groups`](#api-route-get_device_groups)
|
||||
- [`devicegroups`](#api-devicegroups)
|
||||
- [`get_devicegroups`](#api-route-get_devicegroups)
|
||||
- [`get_devices_by_group`](#api-route-get_devices_by_group)
|
||||
- [`routing`](#api-routing)
|
||||
- [`list_bgp`](#api-route-1)
|
||||
- [`switching`](#api-switching)
|
||||
@@ -381,6 +385,7 @@ Input:
|
||||
- to: This is the date you would like the graph to end - See http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html for more information.
|
||||
- width: The graph width, defaults to 1075.
|
||||
- height: The graph height, defaults to 300.
|
||||
- ifDescr: If this is set to true then we will use ifDescr to lookup the port instead of ifName. Pass the ifDescr value you want to search as you would ifName.
|
||||
|
||||
Example:
|
||||
```curl
|
||||
@@ -534,6 +539,8 @@ Update devices field in the database.
|
||||
|
||||
Route: /api/v0/devices/:hostname
|
||||
|
||||
- hostname can be either the device hostname or id
|
||||
|
||||
Input (JSON):
|
||||
|
||||
- field: The column name within the database
|
||||
@@ -555,6 +562,154 @@ Output:
|
||||
]
|
||||
```
|
||||
|
||||
### <a name="api-route-get_device_groups">Function `get_device_groups`</a> [`top`](#top)
|
||||
|
||||
List the device groups that a device is matched on.
|
||||
|
||||
Route: /api/v0/devices/:hostname/groups
|
||||
|
||||
- hostname can be either the device hostname or id
|
||||
|
||||
Input (JSON):
|
||||
|
||||
-
|
||||
|
||||
Examples:
|
||||
```curl
|
||||
curl -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/devices/localhost/groups
|
||||
```
|
||||
|
||||
Output:
|
||||
```text
|
||||
[
|
||||
{
|
||||
"status": "ok",
|
||||
"message": "Found 1 device groups",
|
||||
"count": 1,
|
||||
"groups": [
|
||||
{
|
||||
"id": "1",
|
||||
"name": "Testing",
|
||||
"desc": "Testing",
|
||||
"pattern": "%devices.status = \"1\" &&"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## <a name="api-devicegroups">`Device Groups`</a> [`top`](#top)
|
||||
|
||||
### <a name="api-route-get_devicegroups">Function `get_devicegroups`</a> [`top`](#top)
|
||||
|
||||
List all device groups.
|
||||
|
||||
Route: /api/v0/devicegroups
|
||||
|
||||
Input (JSON):
|
||||
|
||||
-
|
||||
|
||||
Examples:
|
||||
```curl
|
||||
curl -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/devicegroups
|
||||
```
|
||||
|
||||
Output:
|
||||
```text
|
||||
[
|
||||
{
|
||||
"status": "ok",
|
||||
"message": "Found 1 device groups",
|
||||
"count": 1,
|
||||
"groups": [
|
||||
{
|
||||
"id": "1",
|
||||
"name": "Testing",
|
||||
"desc": "Testing",
|
||||
"pattern": "%devices.status = \"1\" &&"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### <a name="api-route-get_devices_by_group">Function `get_devices_by_group`</a> [`top`](#top)
|
||||
|
||||
List all devices matching the group provided.
|
||||
|
||||
Route: /api/v0/devicegroups/:name
|
||||
|
||||
- name Is the name of the device group which can be obtained using [`get_devicegroups`](#api-route-get_devicegroups). Please ensure that the name is urlencoded if it needs to be (i.e Linux Servers would need to be urlencoded.
|
||||
|
||||
Input (JSON):
|
||||
|
||||
-
|
||||
|
||||
Examples:
|
||||
```curl
|
||||
curl -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/devicegroups/LinuxServers
|
||||
```
|
||||
|
||||
Output:
|
||||
```text
|
||||
[
|
||||
{
|
||||
"status": "error",
|
||||
"message": "Found 1 in group LinuxServers",
|
||||
"count": 1,
|
||||
"devices": [
|
||||
{
|
||||
"device_id": "1",
|
||||
"hostname": "localhost",
|
||||
"sysName": "hostname",
|
||||
"community": "librenms",
|
||||
"authlevel": null,
|
||||
"authname": null,
|
||||
"authpass": null,
|
||||
"authalgo": null,
|
||||
"cryptopass": null,
|
||||
"cryptoalgo": null,
|
||||
"snmpver": "v2c",
|
||||
"port": "161",
|
||||
"transport": "udp",
|
||||
"timeout": null,
|
||||
"retries": null,
|
||||
"bgpLocalAs": null,
|
||||
"sysObjectID": ".1.3.6.1.4.1.8072.3.2.10",
|
||||
"sysDescr": "Linux li1045-133.members.linode.com 4.1.5-x86_64-linode61 #7 SMP Mon Aug 24 13:46:31 EDT 2015 x86_64",
|
||||
"sysContact": "",
|
||||
"version": "4.1.5-x86_64-linode61",
|
||||
"hardware": "Generic x86 64-bit",
|
||||
"features": "CentOS 7.1.1503",
|
||||
"location": "",
|
||||
"os": "linux",
|
||||
"status": "1",
|
||||
"status_reason": "",
|
||||
"ignore": "0",
|
||||
"disabled": "0",
|
||||
"uptime": "4615964",
|
||||
"agent_uptime": "0",
|
||||
"last_polled": "2015-12-12 13:20:04",
|
||||
"last_poll_attempted": null,
|
||||
"last_polled_timetaken": "1.90",
|
||||
"last_discovered_timetaken": "79.53",
|
||||
"last_discovered": "2015-12-12 12:34:21",
|
||||
"last_ping": "2015-12-12 13:20:04",
|
||||
"last_ping_timetaken": "0.08",
|
||||
"purpose": null,
|
||||
"type": "server",
|
||||
"serial": null,
|
||||
"icon": null,
|
||||
"poller_group": "0",
|
||||
"override_sysLocation": "0",
|
||||
"notes": "Nope"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## <a name="api-routing">`Routing`</a> [`top`](#top)
|
||||
|
||||
### <a name="api-route-1">Function: `list_bgp`</a> [`top`](#top)
|
||||
|
||||
@@ -13,6 +13,8 @@ Here we will provide configuration details for these modules.
|
||||
|
||||
- HTTP Auth: http-auth
|
||||
|
||||
- Radius: radius
|
||||
|
||||
#### User levels
|
||||
|
||||
- 1: Normal User. You will need to assign device / port permissions for users at this level.
|
||||
@@ -125,3 +127,19 @@ $config['auth_ad_groups']['admin']['level'] = 10;
|
||||
$config['auth_ad_groups']['pfy']['level'] = 7;
|
||||
$config['auth_ad_require_groupmembership'] = 0;
|
||||
```
|
||||
|
||||
#### Radius Authentication
|
||||
|
||||
Please note that a mysql user is created for each user the logs in successfully. User level 1 is assigned to those accounts so you will then need to assign the relevant permissions unless you set `$config['radius']['userlevel']` to be something other than 1.
|
||||
|
||||
> Cleanup of old accounts is done using the authlog. You will need to set the cleanup date for when old accounts will be purged which will happen AUTOMATICALLY.
|
||||
> Please ensure that you set the $config['authlog_purge'] value to be greater than $config['radius']['users_purge'] otherwise old users won't be removed.
|
||||
|
||||
```php
|
||||
$config['radius']['hostname'] = 'localhost';
|
||||
$config['radius']['port'] = '1812';
|
||||
$config['radius']['secret'] = 'testing123';
|
||||
$config['radius']['timeout'] = 3;
|
||||
$config['radius']['users_purge'] = 14;//Purge users who haven't logged in for 14 days.
|
||||
$config['radius']['default_level'] = 1;//Set the default user level when automatically creating a user.
|
||||
```
|
||||
|
||||
@@ -23,6 +23,7 @@ LibreNMS 3rd party acknowledgements
|
||||
- Tag Manager (http://soliantconsulting.github.io/tagmanager/): MIT
|
||||
- TW Sack (https://code.google.com/p/tw-sack/): GPLv3
|
||||
- Gridster (http://gridster.net/): MIT
|
||||
- Pure PHP radius class (http://developer.sysco.ch/php/): GPLv3
|
||||
|
||||
#### 3rd Party GPLv3 Non-compliant
|
||||
|
||||
|
||||
@@ -5,26 +5,59 @@
|
||||
- Fixed regex for negative lat/lng coords (PR2524)
|
||||
- Fixed map page looping due to device connected to itself (PR2545)
|
||||
- Fixed PATH_INFO for nginx (PR2551)
|
||||
- urlencode the custom port types (PR2597)
|
||||
- Stop non-admin users from being able to get to settings pages (PR2627)
|
||||
- Fix JpGraph php version compare (PR2631)
|
||||
- Discovery / Polling:
|
||||
- Pointed snmp calls for Huawei to correct MIB folder (PR2541)
|
||||
- Fixed Ceph unix-agent support. (PR2588)
|
||||
- Moved memory graphs from storage to memory polling (PR2616)
|
||||
- Mask alert_log mysql output when debug is enabled to stop console crashes (PR2618)
|
||||
- Stop Quanta devices being detected as Ubiquiti (PR2632)
|
||||
- Fix MySQL unix-agent graphs (PR2645)
|
||||
- Added MTA-MIB and NETWORK-SERVICES-MIB to stop warnings printed in poller debug (PR2653)
|
||||
- Services:
|
||||
- Fix SSL check for PHP 7 (PR2647)
|
||||
- Alerting:
|
||||
- Fix glue-expansion for alerts (PR2522)
|
||||
- Fix HipChat transport (PR2586)
|
||||
- Documentation:
|
||||
- Removed duplicate mysql-client install from Debian/Ubuntu install docs (PR2543)
|
||||
- Misc:
|
||||
- Update daily.sh to ignore issues writing to log file (PR2595)
|
||||
|
||||
#### Improvements
|
||||
- WebUI:
|
||||
- Converted sensors page to use bootgrid (PR2531)
|
||||
- Added new widgets for dashboard. Notes (PR2582), Generic image (PR2617)
|
||||
- Added config option to disable lazy loading of images (PR2589)
|
||||
- Visual update to Navbar. (PR2593)
|
||||
- Update alert rules to show actual alert rule ID (PR2603)
|
||||
- Initial support added for per user default dashboard (PR2620)
|
||||
- Updated Worldmap to show clusters in red if one device is down (PR2621)
|
||||
- Discovery / Polling
|
||||
- Added traffic bits as default for Cambium devices (PR2525)
|
||||
- Overwrite eth0 port data from UniFi MIBs for AirFibre devices (PR2544)
|
||||
- Added lastupdate column to sensors table for use with alerts (PR2590,PR2592)
|
||||
- Updated auto discovery via lldp to check for devices that use mac address in lldpRemPortId (PR2591)
|
||||
- Updated auto discovery via lldp with absent lldpRemSysName (PR2619)
|
||||
- API:
|
||||
- Added ability to filter devices by type and os for Oxidized API call (PR2539)
|
||||
- Added ability to update device information (PR2585)
|
||||
- Added support for returning device groups (PR2611)
|
||||
- Added ability to select port graphs based on ifDescr (PR2648)
|
||||
- Documentation:
|
||||
- Improved alerting docs explaining more options (PR2560)
|
||||
- Added Docs for Ubuntu/Debian Smokeping integration (PR2610)
|
||||
- Added detection for:
|
||||
- Updated Netonix switch MIBs (PR2523)
|
||||
- Updated Fotinet MIBs (PR2529, PR2534)
|
||||
- Cisco SG500 (PR2609)
|
||||
- Updated processor support for Fortigate (PR2613)
|
||||
- Misc:
|
||||
- Updated validation to check for php extension and classes required (PR2602)
|
||||
- Added Radius Authentication support (PR2615)
|
||||
- Removed distinct() from alerts query to use indexes (PR2649)
|
||||
|
||||
### November 2015
|
||||
|
||||
|
||||
Reference in New Issue
Block a user