79 Commits

Author SHA1 Message Date
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
9dbb6c3262 fix: When force adding, use the provided snmp details rather than from $config (#7004) 2017-07-13 19:17:59 -05:00
db3a0c2623 fix: When force adding devices with v3, actually store the details (#6691) 2017-05-20 06:59:58 -05:00
9a33464c52 refactor: Centralize includes and initialization (#4991) 2016-11-21 20:12:59 +00:00
27cf5a3ae1 Removed debug 2016-09-16 10:19:25 +01:00
ed48e8f0c8 fix: Force add now ignores all snmp queries 2016-09-16 09:40:00 +01: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
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
aa8294bfce c_echo
Console_color2 helper.
If $console_color isn't instantiated, remove the color directives and print.
2016-08-16 20:01:22 -05:00
eadeeb9409 Fix addHost force_add logic
Use boolean where we can
Fixes #4001
2016-08-09 15:13:42 -05:00
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
52d31369f0 addHost.php output improvements/fixes 2016-08-03 15:16:30 -05:00
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
laf
8a46c7611d Add support for stopping devices being added with duplicate sysNames 2016-05-02 20:20:29 +00:00
2ae99e50f5 Add support for setting port association mode when adding a host.
This adds a '-p' switch to addhost.php and a select box to the WebUI to
  set the port association mode for newly added devices.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
2016-01-26 13:49:57 +01:00
604620cb1c addhost.php: Fix indented prompt when erroring out 2015-11-03 13:58:12 +01:00
d8693f05ae Fix coding style part 2 2015-07-15 11:04:22 +02:00
laf
c4572c206a Added debugging output of invalid snmpv3 args 2015-06-24 16:32:42 +01:00
7f3f942e83 Adding the ability to use multiple poller groups for a poller. 2015-06-22 12:37:00 +02:00
laf
8391a39f8f Updated addhost.php to use distributed_poller_group if set 2015-05-09 10:34:55 +01:00
laf
88775be882 Removed old debug line! 2015-03-25 19:48:55 +00:00
laf
ab82effa3b Updated adding devices for distributed poller 2015-03-19 22:06:13 +00:00
laf
c1ef9b6808 Resolved a large number index issues and update Console_Color to V2 2015-03-01 18:04:57 +00:00
aa9dded019 Remove user-facing references to Observium
This eliminates nearly all of the user-facing references to Observium,
including in the names of temporary files and in the metadata of PDFs.  Many
of these may not be used any more, but I've adjusted them anyway.  These
changes should also make it easier to change the branding later if it is
needed.  There are a few references of which I still don't understand the
significance, so I've left them as-is for now.  The Unix agent in particular
is rather untidy.
2013-11-05 09:33:32 +10:00
63d428c0e1 Revert "update copyright notice" after discussion with Paul
This reverts commit 774233327e3b300011b7a6fdcbef3a375f34b8b8.
2013-10-28 12:01:36 -07:00
774233327e update copyright notice 2013-10-28 01:46:59 -07:00
73cbb710a0 replace "sha1" with "sha", as required by net-snmp
git-svn-id: http://www.observium.org/svn/observer/trunk@3189 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-15 17:03:35 +00:00
4985943822 syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@3185 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-15 15:18:57 +00:00
790480769b snmpv3 support. for hipsters.
git-svn-id: http://www.observium.org/svn/observer/trunk@3156 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-09 16:18:23 +00:00
dbf212f652 phpDocumentator headers. retire static-config. IF YOU ARE READING THIS, REMOVE IT FROM THE BOTTOM YOUR CONFIG.PHP. YES. YOU.
git-svn-id: http://www.observium.org/svn/observer/trunk@3150 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-09 10:01:42 +00:00
a10d3f75ea syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@3008 61d68cd4-352d-0410-923a-c4978735b2b8
2012-04-09 15:30:45 +00:00
015695e724 when no snmp version is given on commandline, try v2c first, then v1
git-svn-id: http://www.observium.org/svn/observer/trunk@2991 61d68cd4-352d-0410-923a-c4978735b2b8
2012-04-08 11:04:43 +00:00
6b210ea056 change directory to observium root, now also for other commandline tools
git-svn-id: http://www.observium.org/svn/observer/trunk@2990 61d68cd4-352d-0410-923a-c4978735b2b8
2012-04-08 10:44:41 +00:00
83f335785b make addhost from the webinterface work correctly
git-svn-id: http://www.observium.org/svn/observer/trunk@2646 61d68cd4-352d-0410-923a-c4978735b2b8
2011-10-05 09:32:34 +00:00
86c65da8aa fix addhost? oops?
git-svn-id: http://www.observium.org/svn/observer/trunk@2645 61d68cd4-352d-0410-923a-c4978735b2b8
2011-10-05 08:53:44 +00:00
5aaa8b970d small addhost cleanup
git-svn-id: http://www.observium.org/svn/observer/trunk@2644 61d68cd4-352d-0410-923a-c4978735b2b8
2011-10-04 15:05:27 +00:00
43f3c547b7 typo fix in addhost
git-svn-id: http://www.observium.org/svn/observer/trunk@2524 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-20 15:48:12 +00:00
f87ed09e1b more code cleanup
git-svn-id: http://www.observium.org/svn/observer/trunk@2519 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-20 14:34:27 +00:00
d864ce234f kill a whole bunch of trailing spaces
git-svn-id: http://www.observium.org/svn/observer/trunk@2516 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-20 09:55:11 +00:00
fb5d8b398f new funky discovery stuff (autodiscovery works now for discovery protocols)
git-svn-id: http://www.observium.org/svn/observer/trunk@2460 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-14 17:26:59 +00:00
52ebbeab79 add symbol ap support (thanks to David Magniez)
git-svn-id: http://www.observium.org/svn/observer/trunk@2431 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-08 13:36:32 +00:00
9fc744aac3 updates to addhost and cleanups. add ability to do colour on console :D :D :D
git-svn-id: http://www.observium.org/svn/observer/trunk@2430 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-08 12:24:18 +00:00
bc0cdd2415 move poller.php (inc os/system) to db* (and others, but poller is biggest change)
git-svn-id: http://www.observium.org/svn/observer/trunk@2298 61d68cd4-352d-0410-923a-c4978735b2b8
2011-05-13 11:42:26 +00:00
340c71b2e7 more code cleanups, modify renamehost to also take a source parameter so we can build a renamehost function into the web gui some day
git-svn-id: http://www.observium.org/svn/observer/trunk@1980 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-27 10:21:19 +00:00
de7ff537cc revert r1957 patch
git-svn-id: http://www.observium.org/svn/observer/trunk@1960 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-23 09:54:56 +00:00
6501cd29b5 - Code cleanup by Bastian Widmer.
git-svn-id: http://www.observium.org/svn/observer/trunk@1957 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-22 20:27:39 +00:00
9cef58a8b3 correctly let the user know if the host could not be added
git-svn-id: http://www.observium.org/svn/observer/trunk@1934 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-19 10:24:44 +00:00
afb40ceac9 cycle all configured communities on addhost, remove dead code, minor optimisation on isdomainresolves
git-svn-id: http://www.observium.org/svn/observer/trunk@1933 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-19 10:18:45 +00:00