Skip to content

Commit

Permalink
Deploy to GitHub pages
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Oct 26, 2024
1 parent 1f3e8d5 commit 3536e1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Extensions/Applications/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -661,10 +661,10 @@
</code></pre></div> <p>A disk line is can be as simple as just a disk name under /dev/. Such as in the config above The line "ada0" would resolve to "/dev/ada0" and would be called with no special argument. If a line has a space in it, everything before the space is treated as the disk name and is what used for reporting and everything after that is used as the argument to be passed to smartctl.</p> <p>If you want to guess at the configuration, call it with -g and it will print out what it thinks it should be.</p> <ol> <li>Restart snmpd on your host</li> </ol> <p>The application should be auto-discovered as described at the top of the page. If it is not, please follow the steps set out under <code>SNMP Extend</code> heading top of page.</p> <ol> <li>Optionally setup nightly self tests for the disks. The exend will run the specified test on all configured disks if called with the -t flag and the name of the SMART test to run.</li> </ol> <div class=highlight><pre><span></span><code> 0 0 * * * /etc/snmp/smart -t long
</code></pre></div> <h2 id=sneck>Sneck</h2> <p>This is for replacing Nagios/Icinga or the LibreNMS service integration in regards to NRPE. This allows LibreNMS to query what checks were ran on the server and keep track of totals of OK, WARNING, CRITICAL, and UNKNOWN statuses.</p> <p>The big advantage over this compared to a NRPE are as below.</p> <ul> <li>It does not need to know what checks are configured on it.</li> <li>Also does not need to wait for the tests to run as sneck is meant to be ran via cron and the then return the cache when queried via SNMP, meaning a lot faster response time, especially if slow checks are being performed.</li> <li>Works over proxied SNMP connections.</li> </ul> <p>Included are alert examples. Although for setting up custom ones, the metrics below are provided.</p> <table> <thead> <tr> <th>Metric</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>ok</td> <td>Total OK checks</td> </tr> <tr> <td>warning</td> <td>Total WARNING checks</td> </tr> <tr> <td>critical</td> <td>Total CRITICAL checks</td> </tr> <tr> <td>unknown</td> <td>Total UNKNOWN checks</td> </tr> <tr> <td>errored</td> <td>Total checks that errored</td> </tr> <tr> <td>time_to_polling</td> <td>Differnce in seconds between when polling data was generated and when polled</td> </tr> <tr> <td>time_to_polling_abs</td> <td>The absolute value of time_to_polling.</td> </tr> <tr> <td>check_$CHECK</td> <td>Exit status of a specific check <code>$CHECK</code> is equal to the name of the check in question. So <code>foo</code> would be <code>check_foo</code></td> </tr> </tbody> </table> <p>The standard Nagios/Icinga style exit codes are used and those are as below.</p> <table> <thead> <tr> <th>Exit</th> <th>Meaning</th> </tr> </thead> <tbody> <tr> <td>0</td> <td>okay</td> </tr> <tr> <td>1</td> <td>warning</td> </tr> <tr> <td>2</td> <td>critical</td> </tr> <tr> <td>3+</td> <td>unknown</td> </tr> </tbody> </table> <p>To use <code>time_to_polling</code>, it will need to enabled via setting the config item below. The default is false. Unless set to true, this value will default to 0. If enabling this, one will want to make sure that NTP is in use every were or it will alert if it goes over a difference of 540s.</p> <div class=highlight><pre><span></span><code>lnms config:set app.sneck.polling_time_diff true
</code></pre></div> <p>For more information on Sneck, check it out at <a href=https://metacpan.org/dist/Monitoring-Sneck>MetaCPAN</a> or <a href=https://github.com/VVelox/Monitoring-Sneck>Github</a>.</p> <p>For poking systems using Sneck, also check out boop_snoot if one wants to query those systems via the CLI. Docs on it at <a href=https://metacpan.org/dist/Monitoring-Sneck-Boop_Snoot>MetaCPAN</a> and <a href=https://github.com/VVelox/Monitoring-Sneck-Boop_Snoot>Github</a>.</p> <h3 id=snmp-extend_61>SNMP Extend</h3> <ol> <li>Install the extend.</li> </ol> <div class=highlight><pre><span></span><code># FreeBSD
pkg install p5-JSON p5-File-Slurp p5-MIME-Base64 p5-Gzip-Faster p5-App-cpanminus
pkg install p5-JSON p5-File-Slurp p5-MIME-Base64 p5-App-cpanminus
cpanm Monitoring::Sneck
# Debian based systems
apt-get install zlib1g-dev cpanminus
apt-get install cpanminus libjson-perl libfile-slurp-perl libmime-base64-perl
cpanm Monitoring::Sneck
</code></pre></div> <ol> <li> <p>Configure any of the checks you want to run in <code>/usr/local/etc/sneck.conf</code>. You con find it documented <a href=https://metacpan.org/pod/Monitoring::Sneck#CONFIG-FORMAT>here</a>.</p> </li> <li> <p>Set it up in cron. This will mean you don't need to wait for all the checks to complete when polled via SNMP, which for like SMART or other long running checks will mean it timing out. Also means it does not need called via sudo as well.</p> </li> </ol> <div class=highlight><pre><span></span><code>*/5 * * * * /usr/bin/env PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin /usr/local/bin/sneck -u 2&gt; /dev/null &gt; /dev/null
</code></pre></div> <ol> <li>Set it up in the snmpd config and restart snmpd. The <code>-c</code> flag will tell read it to read from cache instead of rerunning the checks.</li> </ol> <div class=highlight><pre><span></span><code>extend sneck /usr/bin/env PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin /usr/local/bin/sneck -c
Expand Down
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

0 comments on commit 3536e1e

Please sign in to comment.