Commit Graph

17 Commits

Author SHA1 Message Date
Tony Murray
2501b7a4db
Remove internal usages of config_to_json.php (#16388)
* Remove internal usages of config_to_json.php

* Appease lint
2024-09-13 13:22:01 +02:00
Tony Murray
4b3e6ebf15
snmpscan.py output errors and nodns (#15673)
* snmpscan.py output errors and nodns
Add symbols for nodns (-o) and errors.
-v will include detailed info as always.

* Add E to legend

* fix too long lines

* Fix it the way black wants, apparently.

* try 3

* attempt 4
2024-05-08 09:51:44 -05:00
SourceDoctor
93f270155f
snmp-scan filter for dns resolved devices (#14934)
* snmp-scan filter for dns resolved devices

* .

* add console arguments
2023-04-07 13:24:18 -05:00
IVI053
3a379431a5
Added --ping-only to snmp-scan.py (#13810)
* added --ping-only and --ping-fallback; deprecated -P

* Updated help text for snmp-scan.py

* format fixes

* appease lint again
2022-04-22 01:27:40 -05:00
Tony Murray
75ba74fe5b
Migrate addhost.php to lnms device:add (#13870)
* Migrate addhost.php to lnms device:add
Have snmp-scan.py call lnms device:add (make exit codes line up so this works)
Fix issue with ping only devices trying to detect os via snmp
Reorder options in device:add help and improve formatting
Update docs to remove references to addhost.php
Fix a bit of code that was in functional code

* fixes

* fix snmp version message
2022-04-04 10:41:18 -05:00
Jellyfrog
9946fe8b15
Format python code with Black (#12663) 2021-03-28 11:02:33 -05:00
Jellyfrog
20b4215204
Swich links to https (#12511)
* Switch librenms links to https

* Convert librenms links in comments

* Switch gnu.org url to https

* switch php urls to https
2021-02-09 00:29:04 +01:00
Nathan Lam
f515a83575
Add functionality to use snmp-scan.py to addto specific poller group (#12029)
* Add functionality to use snmp-scan.py to addto specific poller group

* cast distributed_poller_group to string in case user inputs int in config

* fix syntax
2020-09-03 12:51:16 -05:00
Tony Murray
4b141a068a
python3 only for snmp-scan.py (#11623)
A tiny bit of cleanup too.
2020-05-20 08:24:09 -05:00
Tony Murray
f3ba8947f7
Use Config helper (#10339)
remove usage of global variable
2019-06-23 00:29:12 -05:00
Tony Murray
e1a3533fbe
snmpscan.py: ignore bad DNS config (#8656)
When someone has configured reverse dns that points to an incorrect dns hostname, this should revert to IP properly
2018-05-04 09:46:18 -05:00
Zmegolaz
6fcd406893 Fix: Only add args.ping if it's set. (#7605)
* Only add args.ping if it's set.

* Shorter if.
2017-11-01 12:49:38 -05:00
Zmegolaz
f8d7ccfe0d feature: Support for up/down detection of ping only devices.
* Added support for ping only devices.

* Renamed sql-schema/206 to 207.

* Discovery tried to detect the OS when it shouldn't.

* Updated db_schema.yaml

* Added ping icon.

* Don't show unused graphs and tabs when SNMP is disabled.

* Allow the user to specify OS of ping only devices.

* Removing custom OS now changes it to 'ping'.

* Removed unnecessary use of mres().

* UI select box for SNMP enable/disable.

* Hide device_ping_perf if ping is disable on device.

* Fixed SNMP settings update status messages.

* Added functionality to add ping only devices via the web ui.

* Added ping only option to addhost.php

* Added ping only support to snmp-scan.py

* Moved sql 208 to 211

* Fixed scrutinizer issues.

* Fixed broken ossearch.

* Added ping only support to the API.

* Updated API doc.

* Added (optional) to OS and hardware description. Hid Port Settings, Applications, Modules, Storage, Processors, Memory and Components from the edit menu

* Style fix.

* Updated ping icon.

* clean() instead of mres(). More escaping. Better help in snmp-scan.py and addhost.php

* Fixed scrutinizer issue.

* Always try SNMP in snmp-scan.py, new option for it in addhost.php. Slice instead of chunk in ajax_ossuggest.php. Other minor style changes.

* Updated sql modifications to insert the new column in the same place as in db_schema.yaml.
2017-10-27 22:59:25 -05:00
Tony Murray
fb121923b0 improve text when ipaddress module is missing (#7043) 2017-07-17 19:00:58 +01:00
Tony Murray
b36d3d3408 fix: Don't use Enum in snmp-scan.py (#7036) 2017-07-14 21:56:47 +01:00
Tony Murray
09b4a9d9ce fix: snmp-scan.py now runs on python 2.7 as well as python 3 (#7011)
* fix: snmp-scan.py now runs on python 2.7 as well as python 3

* remove unnecessary comment about -r
chop down long lines

* fix network argument overwriting -r argument
2017-07-12 08:00:01 +01:00
Tony Murray
f810265cc0 feature: parallel snmp-scan.py (#6889)
* feature: parallel snmp-scan.py
Reduces scan time of a /24 from 5 minutes to 14 seconds
Work is done by addhost.php

Just tries to addhost.php hostname/ip right now
Might need some more complexity added there, but I wasn't sure what.

* respect autodiscovery.nets-exclude

* Improvements in ip handling and output
Add compatibility arguments so it can be used as a drop in replacement for snmp-scan.php

* tidy

* Handle errors from config_to_json.php

* Handle Ctrl-C better.  This is likely to get hit when someone scans a /16 or larger or an IPv6 network :)

* Move undefined outcome to proper location

* remove snmp-scan.php
2017-07-03 15:57:56 -05:00