Commit Graph

32 Commits

Author SHA1 Message Date
Tony Murray
f3ba8947f7 Use Config helper (#10339)
remove usage of global variable
2019-06-23 00:29:12 -05:00
PipoCanaja
a2d378e0be Display Up/Down time in Device List (#9951)
* First attempt of Up/Down time

* First attempt of Up/Down time

* Moved to Time::formatInterval()

* cleaning

* last polled in casts

* Cleaning the variants of formatUptime()

* Cleaning in ./html/includes/dev-overview-data.inc.php

* Cleaning in ./html/includes/dev-overview-data.inc.php

* Cleaning in ./html/includes/dev-overview-data.inc.php

* updated includes/polling/core.inc.php

* updated includes/alerts.inc.php

* clean accessors
2019-03-17 21:09:58 -05:00
Jason Cheng
0dc70a8892 Fixed sysName can't display because newline character (#9921) 2019-03-08 08:16:53 -06:00
Tony Murray
fad0bffc43 Escape SNMP & IPMI shell commands (#9537)
hopefully doesn't break anything
Mostly issues with snmp oids and options containing spaces.  Try to remove all of those.

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.
2018-12-16 13:42:50 +00:00
Tony Murray
3e35ee0e7d Refactored and update Location Geocoding (#9359)
- Fix location so it is a regular database relation (this allows multiple devices to be accurately linked to one location and saves api calls)
- Parse coordinates from the location more consistently
- Add settings to webui
- ~~Used [PHP Geocoder](http://geocoder-php.org/), which has lots of backends and is well tested. (also includes reverse and geoip)~~
- Google Maps, Bing, Mapquest, and OpenStreetMap supported initially.
- Default to OpenStreetMap, which doesn't require a key.  They will liberally hand out bans if you exceed 1 query per second though.
- All other Geocoding APIs require an API key. (Google requires a credit card on file, but seems to be the most accurate)
- Update all (I think) sql queries to handle the new structure
- Remove final vestiges of override_sysLocation as a device attribute
- Update existing device groups and rules in DB
- Tested all APIs with good/bad location, no/bad/good key, and no connection.
- Cannot fix advanced queries that use location

This blocks #8868

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.
2018-11-28 22:49:18 +00:00
Lee Keitel
803e5419f3 Fixes #8064 - Use correct array key for uptime value (#8065) 2018-01-09 22:11:17 +00:00
Neil Lathwood
6e134ac4e2 fix: Moved sysDescr snmp call to snmp_get_multi_oid() in core poller module (#8062) 2018-01-09 20:29:57 +00:00
Neil Lathwood
42e5819130 refactor: Updated discovery/poller to use numeric sysObjectID (#7922)
* refactor: Updated discovery to use a core module for sysDescr/sysObjectID use

* final update hopefully

* revert changes

* more changes + docs

* migrated poller to use numerical sysObjectID

* more updates for sysObjectID

* update any alert rules which might have enterprises. in

* moved schema file

* small updates

* updated getHostOS()

* scrut fixes

* updated sysObjectId -> sysObjectID

* updated sysObjectId -> sysObjectID

* updated remainder of sysObjectId -> sysObjectID

* another sysObjectId -> sysObjectID

* fixed secureplatform test data

* Fix tests: $device is not pulled from the database before polling
Also, update the db in the core discovery module.
2018-01-06 23:00:47 -06:00
Tony Murray
c728e4b0cf fix: take another crack at fixing uptime (#6705)
* fix: take another crack at fixing uptime
It looks like we weren't using sysUpTime before???
Simplify the code and just max all the time values.

* inline bad checks
2017-05-22 17:55:52 +01:00
Frank Mogaddedi
dcc6c96ec4 feature Location map regex replace pattern only (#6485)
* Update core.inc.php

* Update rewrites.php

* Update rewrites.php

* Update rewrites.php

* Update Configuration.md

Adding "location_map_regex_sub" documentation

* Update Configuration.md

Better(?) example/explanation for location_map_regex_sub.
2017-04-24 20:06:22 +01:00
Neil Lathwood
df05f3dc37 a small amount more logging for uptime (#6055)
* a small amount more logging for uptime

* do not format
2017-03-04 20:41:07 +00:00
Neil Lathwood
fad5aca1b7 feature: Allow customisation of rrd step/heartbeat when creating new rrd files (#5947)
* feature: Allow customisation of rrd step/heartbeat when creating new rrd files

* revert defaults

* added docs + webui config option

* Move RrdDefinition to an Object to make them easier to create and remove the possibility of typos.

* Fix style/lint issues and missing use statements

* 3 more missing use statements

* updated doc + moved schema file
2017-02-23 22:45:50 +00:00
Richard Mayhew
e4f48e661e Add additional eventlog severity levels (#5879) 2017-02-13 22:32:02 +00:00
Richard Mayhew
5bfd23e7eb webui: New eventlog severity classification (#5830)
* New event log severity model

* Revert "New event log severity model"

This reverts commit 0783527af8.

* New event log severity model

* Fixed spaces vs tabs

* Learning the format requirements

* Learning the format requirements

* Moved the colours in to the stylesheet

* change SQL file to stop conflicting

* refactor log_event so severity isn't last, but reference is.

* keep having to move the file due to new PR conflicts

* Revert "keep having to move the file due to new PR conflicts"

This reverts commit f3030e7218.

* extended support to dashboard and eventlog page

* formatting
2017-02-12 22:41:05 +00:00
Neil Lathwood
2e235b27c6 fix: Various variables will all be updated if they are blank #5811 (#5836) 2017-02-10 14:42:46 -06:00
Neil Lathwood
a984c67f98 fix: Stop openbsd using snmpEngineTime (#5111) 2016-12-07 22:10:57 -06:00
crcro
80497f5295 fix: Ignore meraki bad_uptime #4691 2016-10-08 18:48:11 +01:00
crcro
f06b0ffb66 fix: device with no uptime (#4625)
fix: Add checks for devices with no uptime over snmp #4587
2016-09-27 21:07:42 +01:00
crcro
2c5bd406ae only edgeswitch 2016-09-17 18:06:38 +03:00
crcro
a5f397ed68 fix for ubnt bad edgeswitch/edgeos uptime #4470 2016-09-17 03:49:39 +03:00
Neil Lathwood
7dec670494 refactor: Updated a lot of references to LibreNMS - copyright still left intact (#4339) 2016-09-08 08:12:23 -05:00
Tony Murray
9284bc60ff Update code in includes to be PSR-2 compliant (#4220)
refactor: Update code in /includes to be psr2 compliant #4220
2016-08-28 18:32:58 +01:00
David Bell
050b8e4d5c Include newlines in sysDescr 2016-03-22 16:14:56 +00:00
Tony Murray
9ccf16dd24 Use raw timeticks instead of parsing the string for sysUpTime and hrSystemUptime 2016-02-16 23:46:31 -06:00
Neil Lathwood
f074f25be2 Revert "Revert "Added location_map_regex"" 2016-02-09 19:02:38 +00:00
Daniel Preussker
1110836662 Revert "Added location_map_regex" 2016-02-09 20:00:54 +01:00
pblasquez
937937aa09 Update core.inc.php 2016-02-04 16:10:28 -08:00
Neil Lathwood
abf2fc0ba5 Merge pull request #2740 from paulgear/unified-data-storage-rrd-influx
First cut at unified data storage for rrdtool & influxdb
2016-01-21 23:31:09 +00:00
laf
2a097dd803 Fix uptime issues for devices that fail with additional uptime snmp queries 2016-01-16 20:02:42 +00:00
Paul Gear
72b9f52c59 Rebased against master; use data_update for uptime 2016-01-15 21:52:09 +10:00
laf
c1da4d8a6f rebased 2016-01-10 00:46:04 +00:00
laf
821a797ac9 Moved system polling module to core to centralise some snmpget calls 2015-12-16 20:56:58 +00:00