146 Commits

Author SHA1 Message Date
d303174e7a fix poller.php with missing -h (#9621) 2019-01-07 21:26:57 -06:00
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
eeb3d58f5b Improved Logging and Debugging (#8870)
Use Log facility when Laravel is booted.
Update init.php so we can easily boot Laravel for CLI scripts. (and just Eloquent, but that may go away)
Move all debug setup into set_debug() function and use that across all scripts.
Log Laravel database queries.
Send debug output to librenms log file when enabling debug in the webui.
Allow for colorized Log CLI output. (currently will leave % tags in log file output)

** Needs testing and perhaps tweaking still.

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`
2018-07-13 23:08:00 +01:00
846cf11331 Support specifying submodules in poller and discovery for debug (#8896)
Mostly useful for debugging

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`
2018-07-12 21:30:39 +01:00
0ba76e6d62 New python service for poller, discovery + more (#8455)
Currently has a file handle leak (and will eventually run out of handles) related to the self update process.

Either need to fix that or rip out self-update and leave that up to cron or something.


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`
2018-06-30 12:19:49 +01:00
09d6b2fd54 feature: Added Prometheus PushGateway metric support (#8437)
* Added Prometheus PushGateway support

* fixed formatting

* fix set_curl_proxy to correct variable

* add documentation

* Update Metric-Storage.md

* Update mkdocs.yml
2018-04-13 15:46:19 +01:00
ecbbc0e3e5 feature: Clear OS defs cache on poller/discovery debug (#8061) 2018-01-09 10:51:26 -06:00
51ba934e11 feature: Added web validation (#7474)
* refactor: convert validations to modules to prep for gui integration

* accidentally dropped, schema update

* fix accidental output to webui

* mention discovery-wrapper.py and re-arrange.

* refine some fix statements

* rename the Config validation group to Configuration.

* fix some scrutinizer issues
remove as many local functions from validator.php as possible
move extensions from pre-check
remove duplicate timezone check
looks like there is some db schema differences between mariadb 10.1 and 10.2, investigating

* mariadb version diff take2

* Check schema version first for database.
Remove stop to go back to command line for install docs.
Add helpful link when there is no devices added to /addhost

* fix incorrect validation for empty string defaults

* Fix style

* Add additional file permissions checks

* catch exception and fail for invalid timezone
Change visuals a bit.

* add php version warning

* fix space
2017-10-26 07:56:09 +01:00
d49e893a0a move version info into debug to save exec calls under normal use (#6407) 2017-04-22 08:10:15 -05:00
affe5090f4 feature: Send collected data to graphite server (#6201)
* Initial support for graphite

* Enable graphite include

* fixed typos.

* Fixed port naming to graphite metric names

* Added documentation for Graphite

* added documentation for graphite

* fixed style

* replace / with _ in interface names for graphite

* sets default graphite port

* adds rrd-name tags to the metric, otherwise metrics get lost

* add suggested storage schema for graphite

* add whitespace

* Updated to show some output

* bad english
2017-03-22 10:35:44 -05:00
9ab4c1f4ee fix: restore usage of -i -n in polling (#5228) 2016-12-22 21:33:51 +00:00
bcae14c7d9 Stop running two queries for the same thing (#5177) 2016-12-16 12:15:13 -06:00
db240cb4eb refactor: Collection and output of db and snmp stats (#5049) 2016-11-23 06:57:19 +00:00
9a33464c52 refactor: Centralize includes and initialization (#4991) 2016-11-21 20:12:59 +00:00
d86b39395a refactor: Small poller improvements, removes unecessary queries / execs (#4741) 2016-10-14 20:03:26 -05:00
8b68429a06 Tidy up alert output info for poller cli (#4578) 2016-09-25 10:01:58 -05:00
0ee1fac5da fix: Small database query improvements in poller.php (#4512) 2016-09-21 12:56:42 -05:00
d2193f76ca feature: allow scripts to be run from any working directory (#4437)
* feature: allow validate.php to be run from any working directory

* remove redundant realpath() call

* re-add realpath() to remove symbolic links

* realpath() isn't needed...

* chdir() in all php scripts in ./ and ./scripts/

* update-sql.php clearly is not used, as it was broken.

* Change some scripts to executable
Remove extra chdir() call in snmp-scan.php

* Missed console-ui.php
Kind of fixed console-ui.php help output

* Re-add newline
2016-09-14 16:53:04 +01:00
7dec670494 refactor: Updated a lot of references to LibreNMS - copyright still left intact (#4339) 2016-09-08 08:12:23 -05:00
abc6a5b799 PSR-2 Final cleanup (#4247)
refactor: Final PSR2 cleanup
2016-08-28 23:32:55 +01:00
200e670315 Fix defunct process issues: create Proc class (#4210)
* Proc class
Encapsulate processes in a class, when they go out of scope, we can use the __destruct() process to make sure the process terminates.

* Fix rrdtool_last checks failing

* Don't close rrdtool in rrd_graph
Try to start rrdtool process if they haven't been started yet
Remove some extra debug output

* phpdocs added
several cleanups
should still be functioning the same
Only open one  rrdtool process for graph.php
2016-08-26 07:50:29 +01:00
e80a385b7f RRDtool dual process (remote creation/check) (#4104)
* Prepare for dual rrdtool processes
Disabled at this time
Split out rrdtool version checks into rrdtool_create_command()
Tests for rrdtool_create_command()
Fixes a few small issues.

* Enable dual process and remote rrd check/creation

* remove full path for remote commands

* Doc updates
minor fix to rrdtool_tune()

* Set up bootstrap for phpunit
Fix issues with FileExistsException

* Attempt to fix phpunit

* Fix classloader and bootstrap to use full paths only (not depending on $config)

* Fix phpunit tests, config.php does not exist.
2016-08-22 16:32:05 +01:00
laf
b673432058 Added support for nets-exclude in snmp-scan 2016-08-12 21:39:53 +01:00
846c5ab0c9 Add date to git version info
valdiate: local tz, rfc2822
poller: iso 8601
about: iso 8601 -> browser local
Also, do not fetch github info on about page, it isn't used.
2016-07-06 13:17:13 -05:00
ca9caca264 Update poller.php 2016-04-26 15:30:07 +02:00
1fb1f4473f Update poller.php
";" at the end of the query
2016-04-21 11:46:32 +02:00
111c588816 poller - adding vrf-cisco-lite in device 2016-04-20 00:52:56 +02:00
laf
0558275414 Added verbose debugging, normal debugging will now try and mask certain information 2016-01-17 14:39:17 +00:00
72cc180184 Merge pull request #2719 from SaaldjorMike/del-utime-func
Replaced custom utime() function with microtime(true)
2016-01-10 22:43:31 +00:00
laf
63444e2f39 Rebased 2016-01-10 00:41:20 +00:00
e2d1a8e7d9 Replaced custom utime() function with microtime(true) 2016-01-08 13:33:32 +01:00
laf
fdc0eca44d Centralised version info + used in output 2016-01-06 00:14:35 +00:00
laf
d48aa2789c More influx changes 2015-12-18 11:48:33 +00:00
laf
7b14aada4e Rebased 2015-10-26 11:08:19 +00:00
f0o
da9e071d7d Revert all PHP-Based MySQL Locks introduced in #1584 2015-09-02 14:46:42 +01:00
f0o
26554221fb Add another safety-net to remove locks if the execution of poller/disco gets aborted or killed 2015-09-01 14:49:55 +01:00
f0o
e11f613bdd Pause polling and discovery if there's an update-lock 2015-09-01 14:14:50 +01:00
f0o
b0a302bf77 Release MySQL locks when they are not used anymore 2015-09-01 11:10:56 +01:00
e7c51f2a80 add mysql lock for polling 2015-08-25 11:35:13 -04:00
laf
86059f67c1 updated to use function for last commit 2015-08-25 08:40:20 +00:00
laf
59de0d1478 Clean up some poller debug + added updated version and last git commit 2015-08-24 20:54:19 +00:00
4792879ce5 Remove all unneeded if($debug)-statements and replace them with d_echo in the rest of the directories... 2015-08-21 16:10:01 +02:00
laf
433562d351 More updates for influx 2015-08-19 20:58:02 +00:00
d8693f05ae Fix coding style part 2 2015-07-15 11:04:22 +02:00
07c1be5b00 Revert "Temp fix to remove .index at the start of the poller run" 2015-06-25 14:20:48 +01:00
laf
0624b6c1d0 Temp fix to remove .index at the start of the poller run 2015-06-24 16:39:16 +01:00
f0o
ffd5a3d928 Adds Distributed Polling via Memcached. 2015-03-15 16:29:59 +00:00
laf
976627dbb0 Added +x to poller.php 2015-01-05 21:13:58 +00:00
e867d3f1df Merge branch 'alerting-dirty' of https://github.com/f0o/librenms into f0o-alerting-dirty 2014-12-21 12:56:29 +10:00
laf
807fc9a3ba Alerts gui commit 2014-12-16 20:03:19 +00:00