mirror of
https://github.com/librenms/librenms.git
synced 2024-09-23 19:39:03 +00:00
commit
7dfbfd5c0e
@ -586,8 +586,9 @@ Output:
|
|||||||
"device_id": "1",
|
"device_id": "1",
|
||||||
"rule": "%devices.os != \"Juniper\"",
|
"rule": "%devices.os != \"Juniper\"",
|
||||||
"severity": "warning",
|
"severity": "warning",
|
||||||
"extra": "{\"mute\":true,\"count\":\"15\",\"delay\":null}",
|
"extra": "{\"mute\":true,\"count\":\"15\",\"delay\":null,\"invert\":false}",
|
||||||
"disabled": "0"
|
"disabled": "0",
|
||||||
|
"name": "A test rule"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -648,8 +649,9 @@ Output:
|
|||||||
"device_id": "-1",
|
"device_id": "-1",
|
||||||
"rule": "%devices.os != \"Juniper\"",
|
"rule": "%devices.os != \"Juniper\"",
|
||||||
"severity": "critical",
|
"severity": "critical",
|
||||||
"extra": "{\"mute\":false,\"count\":\"15\",\"delay\":\"300\"}",
|
"extra": "{\"mute\":false,\"count\":\"15\",\"delay\":\"300\",\"invert\":false}",
|
||||||
"disabled": "0"
|
"disabled": "0",
|
||||||
|
"name": "A test rule"
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -671,6 +673,8 @@ Input (JSON):
|
|||||||
- count: This is how many polling runs before an alert will trigger and the frequency.
|
- count: This is how many polling runs before an alert will trigger and the frequency.
|
||||||
- delay: Delay is when to start alerting and how frequently. The value is stored in seconds but you can specify minutes, hours or days by doing 5 m, 5 h, 5 d for each one.
|
- delay: Delay is when to start alerting and how frequently. The value is stored in seconds but you can specify minutes, hours or days by doing 5 m, 5 h, 5 d for each one.
|
||||||
- mute: If mute is enabled then an alert will never be sent but will show up in the Web UI (true or false).
|
- mute: If mute is enabled then an alert will never be sent but will show up in the Web UI (true or false).
|
||||||
|
- invert: This would invert the rules check.
|
||||||
|
- name: This is the name of the rule and is mandatory.
|
||||||
|
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
@ -705,6 +709,8 @@ Input (JSON):
|
|||||||
- count: This is how many polling runs before an alert will trigger and the frequency.
|
- count: This is how many polling runs before an alert will trigger and the frequency.
|
||||||
- delay: Delay is when to start alerting and how frequently. The value is stored in seconds but you can specify minutes, hours or days by doing 5 m, 5 h, 5 d for each one.
|
- delay: Delay is when to start alerting and how frequently. The value is stored in seconds but you can specify minutes, hours or days by doing 5 m, 5 h, 5 d for each one.
|
||||||
- mute: If mute is enabled then an alert will never be sent but will show up in the Web UI (true or false).
|
- mute: If mute is enabled then an alert will never be sent but will show up in the Web UI (true or false).
|
||||||
|
- invert: This would invert the rules check.
|
||||||
|
- name: This is the name of the rule and is mandatory.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
```curl
|
```curl
|
||||||
|
50
doc/Developing/Code-Guidelines.md
Normal file
50
doc/Developing/Code-Guidelines.md
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
# Code structure guidelines
|
||||||
|
|
||||||
|
This document is here to help code standards for contributions towards LibreNMS. The original code base that we forked from had a lack of standards and as such the code base has a variety of different styles. Whilst we don't want to restrict how people write code, these guidelines should mean we have a good standard going forward that makes reading the code easier. All modern day ide's should be able to assist in these guidelines without breaking your usual workflow.
|
||||||
|
|
||||||
|
### Indentation
|
||||||
|
Please use four (4) spaces to indent code rather than a tab. Ensure you increase indentation for nested code blocks.
|
||||||
|
```php
|
||||||
|
if ($foo == 5) {
|
||||||
|
if ($foo == 5) {
|
||||||
|
if ($foo == 5) {
|
||||||
|
```
|
||||||
|
|
||||||
|
### Line length
|
||||||
|
Try to keep the length of a line to about 75-85 characters. This isn't essential but does enable compatbility for all screen sizes but above all enables reading of code easier.
|
||||||
|
|
||||||
|
### Control structures
|
||||||
|
A space should be used both before and after the parenthesis and also surrounding the condition operator.
|
||||||
|
```php
|
||||||
|
if ($foo == 5) {
|
||||||
|
```
|
||||||
|
|
||||||
|
Rather than
|
||||||
|
|
||||||
|
```php
|
||||||
|
if($foo==5){
|
||||||
|
```
|
||||||
|
|
||||||
|
Don't put blocks of code on a single line as in this example.
|
||||||
|
```php
|
||||||
|
if ($foo == 5) { echo 'foo is 5'; }
|
||||||
|
```
|
||||||
|
|
||||||
|
and instead format the code like.
|
||||||
|
```php
|
||||||
|
if ($foo == 5) {
|
||||||
|
echo 'foo is 5';
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Including files
|
||||||
|
Using parenthesis around file includes isn't required, instead just place the file in between ''
|
||||||
|
```php
|
||||||
|
require_once 'includes/snmp.inc.php';
|
||||||
|
```
|
||||||
|
|
||||||
|
### PHP tags
|
||||||
|
Ensure you use <?php rather than the shorthand version <?.
|
||||||
|
```php
|
||||||
|
<?php
|
||||||
|
```
|
@ -10,19 +10,19 @@ Table of Content:
|
|||||||
# <a name="about">About</a>:
|
# <a name="about">About</a>:
|
||||||
|
|
||||||
Librenms can interpret, display and group certain additional information on ports.
|
Librenms can interpret, display and group certain additional information on ports.
|
||||||
For this a small `bash` script is supplied in `librenms/scripts` called `ifAlias`.
|
For this a small `bash` script is supplied in `scripts/` called `ifAlias`.
|
||||||
|
|
||||||
<a name="setup">Setup</a>:
|
<a name="setup">Setup</a>:
|
||||||
|
|
||||||
This requires a little bit of setup on the monitored Server (Not the server running librenms!):
|
This requires a little bit of setup on the monitored Server (Not the server running librenms!):
|
||||||
|
|
||||||
* Add `ifAlias` from `/path/to/librenms/scripts/` or download it from [here](#source) to the Server and make
|
* Add `ifAlias` from `/opt/librenms/scripts/` or download it from [here](#source) to the Server and make
|
||||||
it executeable `chmod +x /path/to/ifAlias`
|
it executeable `chmod +x /path/to/ifAlias`
|
||||||
* Add to `snmpd.conf` something like:
|
* Add to `snmpd.conf` something like:
|
||||||
``pass .1.3.6.1.2.1.31.1.1.1.18 /path/to/ifAlias``
|
``pass .1.3.6.1.2.1.31.1.1.1.18 /path/to/ifAlias``
|
||||||
* Restart your `net-snmpd`
|
* Restart your `net-snmpd`
|
||||||
|
|
||||||
There are no changes to be made or additions to insteall for the polling librenms.
|
There are no changes to be made or additions to install for the polling librenms.
|
||||||
|
|
||||||
Now you can set up your [keywords](#keywords) in your `/etc/network/interfaces`
|
Now you can set up your [keywords](#keywords) in your `/etc/network/interfaces`
|
||||||
``//Add more distributions than just Debian based``
|
``//Add more distributions than just Debian based``
|
||||||
@ -52,4 +52,4 @@ See [examples](#examples) for formats.
|
|||||||
|
|
||||||
# <a name="source">Sourcecode</a>:
|
# <a name="source">Sourcecode</a>:
|
||||||
|
|
||||||
* https://github.com/librenms/librenms/blob/master/scripts/ifAlias
|
* https://github.com/librenms/librenms/blob/master/scripts/ifAlias
|
||||||
|
@ -80,6 +80,8 @@ General Guidelines
|
|||||||
able. Collaborating in real time makes the coordination of contributions
|
able. Collaborating in real time makes the coordination of contributions
|
||||||
easier.
|
easier.
|
||||||
|
|
||||||
|
- Ensure you read the Code Guidelines documention and understand the code style that should be adhered to [6].
|
||||||
|
|
||||||
|
|
||||||
Integrating other code
|
Integrating other code
|
||||||
----------------------
|
----------------------
|
||||||
@ -196,3 +198,4 @@ git push origin issue-####
|
|||||||
"Observium License"
|
"Observium License"
|
||||||
[5]: https://github.com/librenms/librenms/blob/master/AUTHORS.md
|
[5]: https://github.com/librenms/librenms/blob/master/AUTHORS.md
|
||||||
"LibreNMS contributor list"
|
"LibreNMS contributor list"
|
||||||
|
[6]: https://github.com/librenms/librenms/blob/master/doc/Developing/Code-Guidelines.md
|
||||||
|
@ -17,11 +17,18 @@ LibreNMS ships with the following software components:
|
|||||||
|
|
||||||
Other components (needs details filled in):
|
Other components (needs details filled in):
|
||||||
- JpGraph (html/includes/jpgraph): QPL 1.0 license
|
- JpGraph (html/includes/jpgraph): QPL 1.0 license
|
||||||
|
|
||||||
- MIBS (mibs): unknown/various
|
- MIBS (mibs): unknown/various
|
||||||
|
|
||||||
- html/graph-realtime.php: BSD (original?)
|
- html/graph-realtime.php: BSD (original?)
|
||||||
|
|
||||||
- html/includes/collectd/: GPLv2 only
|
- html/includes/collectd/: GPLv2 only
|
||||||
|
|
||||||
- overLIB (html/js/overlib_mini.js): modified Artistic 1.0?
|
- overLIB (html/js/overlib_mini.js): modified Artistic 1.0?
|
||||||
|
|
||||||
- scripts/*/mysql: GPLv2 only
|
- scripts/*/mysql: GPLv2 only
|
||||||
|
|
||||||
- check_mk (scripts/observium_agent*): GPLv2
|
- check_mk (scripts/observium_agent*): GPLv2
|
||||||
|
|
||||||
|
- qTip (html/css/jquery.qtip.min.css and html/js/qtip/jquery.qtip.min.js): GPLv2
|
||||||
|
|
||||||
|
@ -6,21 +6,21 @@
|
|||||||
but should still be useful to users.
|
but should still be useful to users.
|
||||||
|
|
||||||
- Functionality/performance improvements:
|
- Functionality/performance improvements:
|
||||||
- Investigate solutions for poller performance improvement. (Tyler)
|
- Investigate solutions for poller performance improvement. (Tyler)
|
||||||
- Investigate solutions for multiple communities per device. (tooms)
|
- Investigate solutions for multiple communities per device. (tooms)
|
||||||
- Eliminate interface churn for transient interfaces (e.g. ppp/tun) on
|
- Eliminate interface churn for transient interfaces (e.g. ppp/tun) on
|
||||||
net-snmp.
|
net-snmp.
|
||||||
|
|
||||||
- Integrate Nagios-based alerting. Allow user to choose their preferred
|
- ~~Integrate Nagios-based alerting. Allow user to choose their preferred
|
||||||
Nagios distribution/fork.
|
Nagios distribution/fork.~~ Alerting is now present.
|
||||||
|
|
||||||
- Consider adding some non-monitoring administrative functions:
|
- Consider adding some non-monitoring administrative functions:
|
||||||
- enabling/disabling ports
|
- enabling/disabling ports
|
||||||
- changing access port VLANs
|
- changing access port VLANs
|
||||||
- editing port labels
|
- editing port labels
|
||||||
|
|
||||||
- Integrate as many usability improvements as time permits:
|
- Integrate as many usability improvements as time permits:
|
||||||
- Integrate nice menus like current Observium?
|
- ~~Integrate nice menus like current Observium?~~ UI Design improved
|
||||||
- Front page: more automation; GUI configuration?
|
- Front page: more automation; GUI configuration?
|
||||||
|
|
||||||
- Improve / Change alerting system
|
- ~~Improve / Change alerting system~~ Alerting is now present.
|
||||||
|
@ -25,7 +25,7 @@ How LibreNMS will be different from Observium:
|
|||||||
- Development decisions will be community-driven. We want to make software
|
- Development decisions will be community-driven. We want to make software
|
||||||
that fulfills its users' needs. See the [ROADMAP][4] for more thoughts
|
that fulfills its users' needs. See the [ROADMAP][4] for more thoughts
|
||||||
on our current plans.
|
on our current plans.
|
||||||
- Development will probably proceed at a slower pace, at least initially.
|
- ~~Development will probably proceed at a slower pace, at least initially.~~
|
||||||
- There are no plans for a paid version, and we don't anticipate this ever
|
- There are no plans for a paid version, and we don't anticipate this ever
|
||||||
changing.
|
changing.
|
||||||
- There are no current plans for paid support, but this may be added later
|
- There are no current plans for paid support, but this may be added later
|
||||||
@ -36,7 +36,7 @@ How LibreNMS will be different from Observium:
|
|||||||
Reasons why you might want to use Observium instead of LibreNMS:
|
Reasons why you might want to use Observium instead of LibreNMS:
|
||||||
- You have a financial investment in Observium and aren't concerned about
|
- You have a financial investment in Observium and aren't concerned about
|
||||||
community contributions.
|
community contributions.
|
||||||
- You need functionality that has been added to Observium since r3250.
|
- ~~You need functionality that has been added to Observium since r3250.~~ The beauty of LibreNMS is that you can contribute missing features.
|
||||||
- You don't like the [GNU General Public License, version 3][5] or the
|
- You don't like the [GNU General Public License, version 3][5] or the
|
||||||
[philosophy of Free Software/copyleft][6] in general.
|
[philosophy of Free Software/copyleft][6] in general.
|
||||||
|
|
||||||
@ -45,6 +45,7 @@ Reasons why you might want to use LibreNMS instead of Observium:
|
|||||||
investment of time and effort will not be wasted][7].
|
investment of time and effort will not be wasted][7].
|
||||||
- You want to add and experiment with features that are not a priority for
|
- You want to add and experiment with features that are not a priority for
|
||||||
the Observium developers. See [CONTRIBUTING][8] for more details.
|
the Observium developers. See [CONTRIBUTING][8] for more details.
|
||||||
|
- You want to make use of the additional features LibreNMS can offer.
|
||||||
|
|
||||||
[1]: http://postman.memetic.org/pipermail/observium/2013-October/003915.html
|
[1]: http://postman.memetic.org/pipermail/observium/2013-October/003915.html
|
||||||
"Observium edition split announcement"
|
"Observium edition split announcement"
|
||||||
|
Loading…
Reference in New Issue
Block a user