User talk:Jbilyk: Difference between revisions

From Alpine Linux
m (noticed fping needs setuid to work properly)
m (nowiki'd a dead link. Corrected Google URL.)
 
(25 intermediate revisions by one other user not shown)
Line 2: Line 2:
|<div style="font-size: 1.5em; font-weight:bold;"> [[Image:Underconstruction_clock_icon_gray.svg‎|64px|left|link=]] This page is a work in progress ... </div><p style="text-align: center; font-size: 87%;">This page is still being developed.</p>
|<div style="font-size: 1.5em; font-weight:bold;"> [[Image:Underconstruction_clock_icon_gray.svg‎|64px|left|link=]] This page is a work in progress ... </div><p style="text-align: center; font-size: 87%;">This page is still being developed.</p>
|}
|}
Setting_up_Smokeping_to_Monitor__Network_Latency<br />
Idea is to set up Nagios as an SNMP trap receiver, especially for HP Procurve switch alerts<br />
Notes for smokeping and smoketrace (need edge/testing repo to install smokeping):
Source: <nowiki>http://xavier.dusart.free.fr/joomla/index.php/en/nagios/47-traps-snmp-dans-nagios</nowiki> <br />


after install, enable mod_cgi in lighttpd<br />
Add packages:<br />
Assign cgi to run with /usr/bin/perl in mod_cgi (by default it's only in cgi-bin virtual host)<br />
nagios<br />
Softlink /usr/share/webapps/smokeping -> /var/www/localhost/htdocs/smokeping<br />
nagios-web<br />
Softlink /var/lib/smokeping/.simg -> /var/www/localhost/htdocs/img<br />
lighttpd<br />
net-snmp<br />
perl<br />
snmptt (available from edge/testing)<br />
<br />
Create file /etc/snmp/snmptrapd.conf, and populate:<br />
traphandle default /usr/sbin/snmptt<br />
disableAuthorization yes<br />
donotlogtraps  yes<br />
<br />
Edit /etc/conf.d/snmptrapd:<br />
OPTIONS="-On -Lsd -p /var/run/snmptrapd.pid"<br />
Start snmptrapd using init script.<br />
Edit /etc/snmptt.ini and insert contents found at source link.<br />
<br />
To be continued once my testing is complete :). With the config done as above, snmp traps will simply be logged to syslog since they're all unknown to snmptrapd.


/usr/share/perl5/vendor_perl/Qooxdoo/Services/Tr.pm<br />
<br />
line 34: add "sudo", to beginning, add path to traceroute /usr/bin/<br />
This is because in Alpine, regular user can't run a traceroute, but I
don't think people would want this by default (some don't like sudo on
system at all)


/etc/sudoers<br />
Test edit
add lighttpd ALL=(ALL) NOPASSWD: /usr/bin/traceroute<br />
https://www.google.com
 
If using lighttpd, change permissions on /var/lib/smokeping/.simg to 777. <br />
Set fping to using setuid: chmod u+s /usr/sbin/fping<br />
Add hosts to be monitored in /etc/smokeping/config <br />
 
<br />

Latest revision as of 02:00, 28 August 2023

This page is a work in progress ...

This page is still being developed.

Idea is to set up Nagios as an SNMP trap receiver, especially for HP Procurve switch alerts
Source: http://xavier.dusart.free.fr/joomla/index.php/en/nagios/47-traps-snmp-dans-nagios

Add packages:

nagios
nagios-web
lighttpd
net-snmp
perl
snmptt (available from edge/testing)


Create file /etc/snmp/snmptrapd.conf, and populate:

traphandle default /usr/sbin/snmptt
disableAuthorization yes
donotlogtraps yes


Edit /etc/conf.d/snmptrapd:

OPTIONS="-On -Lsd -p /var/run/snmptrapd.pid"

Start snmptrapd using init script.
Edit /etc/snmptt.ini and insert contents found at source link.

To be continued once my testing is complete :). With the config done as above, snmp traps will simply be logged to syslog since they're all unknown to snmptrapd.


Test edit https://www.google.com