Commit Graph

125 Commits

Author SHA1 Message Date
William George
7240741b69 web: Added IP and port calls to API 2017-02-07 09:46:09 +00:00
Neil Lathwood
483c40eddd api: Added parent_id to VMs that have a host #3523 (#5621) 2017-01-26 22:38:43 +00:00
Neil Lathwood
9bcb825560 api: Fixed zombie processes when generating graphs (#5597) 2017-01-25 13:16:59 -06:00
Neil Lathwood
6df39b9bbd api: Added support for retrieving health information and graphs #5399 (#5446) 2017-01-19 10:09:20 +00:00
PandaWawawa
8636a3c3a2 fix: Correction on addHost function to handle the force_add parameter in api (#5329) 2017-01-06 21:47:00 +00:00
Neil Lathwood
4671fb48ab fix: Restrict inventory api calls to the device requested (#5267) 2017-01-01 09:37:28 +00:00
Mickael Marchand
6efdecfd95 fix: support columns filter in get_port_stats_by_port_hostname api call (#5230) 2016-12-23 20:54:13 +00:00
Dave Hope
a970a8ddd1 fix: Fix get_port_stats_by_port_hostname() to only return non-deleted ports #5131 2016-12-08 15:40:00 +00:00
Neil Lathwood
32668026a7 api: Added support for updating multiple device table fields in one call #4954 (#5033) 2016-11-26 20:55:24 +00:00
Tony Murray
9a33464c52 refactor: Centralize includes and initialization (#4991) 2016-11-21 20:12:59 +00:00
Tony Murray
e514e6dc51 fix: api rate percent calculation incorrect (#4956) 2016-11-08 22:26:24 +00:00
Tijmen de Mes
d724cb4ea9 Fixed API call to services to return services from all devices 2016-10-25 12:10:42 +02:00
Neil Lathwood
56557f68a4 api: Added additional port stats info like pps, perc and rate (#4759) 2016-10-15 00:42:54 +01:00
Dennis Væversted
8e4be8bbb2 api: Add severity on list alerts API method (#4436)
* Added severity field from the alert rule to the output of list_alerts.

* I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md.
2016-09-14 14:29:46 +01:00
nerdalertdk
8924e954c4 Missing variable in services api call
fix: Missing variable in services api call
2016-08-27 14:46:54 +01:00
nerdalertdk
8a6ad076e2 Update api_functions.inc.php 2016-08-26 11:45:25 +02:00
nerdalertdk
feb6696026 tabs to spaces 2016-08-26 10:11:20 +02:00
nerdalertdk
c873a3556e use space not tabs 2016-08-26 09:26:52 +02:00
nerdalertdk
0f12c61259 list_services
/services?state = filter by service state
/service?type = filter by service type
2016-08-26 09:19:05 +02:00
Tony Murray
b8e9b2d917 Implement an autoloader (#4140)
* Implement an autoloader

When cleaning up classes for psr2, things got a bit unwieldy, so I implemented a class autoloader.
I created a PSR-0 compliant LibreNMS directory and moved all classes there that made sense.
Implemented LibreNMS\ClassLoader which supports adding manual class mappings

This reduces the file includes needed and only loads classes when needed.

* Add teh autoloader to graph.php

* Add a small bit of docs
Fix incomplete class in includes/discovery/functions.inc.php
2016-08-21 14:07:14 +01:00
Tony Murray
8c639aa5a4 PSR2 Cleanup: /html edition
Travis tests for code conformance. Ignore warnings for now.
Fixed all errors, left most warnings.
2016-08-18 21:29:30 -05:00
Tony Murray
f3fc6f2906 Use Exceptions
Use exceptions for addHost()
Gets rid of silly mixed return and only returns the device_id.  Throwing an exception if we run into any issues.
Slightly modifies api add host output again to include device_id
2016-08-07 12:16:40 -05:00
Tony Murray
66bed276c2 Reconstruct addHost() so it is easier to understand
Update addHost() to return either device_id or a string
modify print_error(), print_message() to allow for $quiet variable
Only call addHost() once in addhost.php, if the snmp version isn't set, addHost will cope
Fix up snmp-scan.php and discovery-protocols.inc.php to detect when a device already exists
change in ip_exists() to make it more readable
2016-08-02 00:31:27 -05:00
Søren Rosiak
53a4e0385c Merge pull request #3726 from laf/api-arp 2016-07-10 22:08:21 +02:00
Brandon Boudrias
4ad75fb89d create common method for generating type_wheres 2016-06-30 17:05:55 -07:00
laf
0b8f06efa3 Added support for searching for arp entry 2016-06-27 14:48:07 +01:00
Neil Lathwood
5cb9d751c3 Revert "deduping type_where code, adding manual types to graph widgets " 2016-06-07 09:15:04 +01:00
Neil Lathwood
142e11f9d8 Merge pull request #3597 from brandune/rollup_graphs
deduping type_where code, adding manual types to graph widgets
2016-06-06 18:59:40 +01:00
Brandon Boudrias
3b4964e13c create common method for generating type_wheres 2016-06-03 10:42:16 -07:00
Tony Murray
009840bf8a Store device group relationships in a pivot table. 2016-06-02 13:25:01 -05:00
Paul Heinrichs
b46a70185f API bug fix 2016-05-04 15:50:41 -04:00
laf
f801f63a99 Missing AND 2016-04-22 14:42:33 +00:00
laf
78204f3971 Added api call for ipsec tunnels 2016-04-22 13:41:38 +00:00
jnewell
0e6093abfc Added device/port_stack API endpoint. Updated documentation 2016-04-05 14:25:45 -07:00
jnewell
e40042bd5c Added device/port_stack API endpoint 2016-04-05 13:03:17 -07:00
Aaron Daniels
9706a85454 - Added add, edit and delete API calls for components.
- Added documentation for the new calls.
2016-03-30 17:16:14 +10:00
Neil Lathwood
240ffe55af Merge pull request #3178 from Ultra2D/api-ldap
API access when using LDAP authentication
2016-03-13 20:06:35 +00:00
Ultra2D
d63744c32c Only use get_user if it exists 2016-03-10 08:17:09 +01:00
Ultra2D
322053c827 API access when using LDAP authentication 2016-03-07 14:07:51 +01:00
laf
f0fb602046 Added support for os in oxidized groups 2016-03-05 00:48:51 +00:00
laf
59a1050df6 Fixed device ip binary decode 2016-01-20 18:19:15 +00:00
Aaron Daniels
6492b887e9 Merge branch 'master' of https://github.com/adaniels21487/librenms into issue-1650 2016-01-14 06:10:31 +10:00
Aaron Daniels
87e88dacfd - Compress API filters to a loop
- Check for filters for valid fields
2016-01-14 05:22:37 +10:00
laf
a35f6d8c7a Added group support for Oxidized 2016-01-10 19:45:54 +00:00
Rosiak
c3ce59124e Fix some spellings. 2016-01-07 23:02:18 +01:00
Aaron Daniels
6286d7cb6a Merge branch 'master' of https://github.com/adaniels21487/librenms into issue-1650
Conflicts:
	html/api_v0.php
	html/includes/api_functions.inc.php
2015-12-22 11:16:54 +10:00
laf
5f4837cdb8 Did not update vars to _GET before submitting 2015-12-21 18:22:36 +00:00
Daniel Preussker
c276cc5ec4 Merge pull request #2611 from laf/issue-2451
Added new API calls to support device groups
2015-12-20 17:35:27 +00:00
laf
d8095707b2 Added flag to get_graph_by_port_hostname() API call to switch port look up to use ifDescr 2015-12-19 19:10:18 +00:00
Aaron Daniels
c63b7119cb Device Components.
The purpose of this feature is to provide a framework for discovery modules to store
information in the database, without needing to add new tables for each feature.

This Feature provides:
- A database structure to store data.
- An API to store and retrieve data from the database.
- Integration to the LibreNMS APIv0.
- Ability to disable/ignore components.
- Default alerting rules.

- The API returns $COMPONENT[$device_id][$component_id] to allow pulling of data for multiple devices.
  The intent is to be able to create 'Applications' the consolidate data from applications covering multiple devices.
- Added some developer documentation
2015-12-14 07:52:03 +10:00