Anbindung HP Procurve an Syslog-Server: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(Die Seite wurde neu angelegt: „=On HP Procurve= <pre> *configure terminal *logging facility syslog *logging 10.82.0.120 </pre> =On Syslog-Server= ==Add Lines== *vi /etc/rsyslog.conf <pre>…“) |
|||
| (Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
=On HP Procurve= | =On HP Procurve= | ||
| − | |||
*configure terminal | *configure terminal | ||
*logging facility syslog | *logging facility syslog | ||
*logging 10.82.0.120 | *logging 10.82.0.120 | ||
| − | |||
=On Syslog-Server= | =On Syslog-Server= | ||
| Zeile 10: | Zeile 8: | ||
*vi /etc/rsyslog.conf | *vi /etc/rsyslog.conf | ||
<pre> | <pre> | ||
| + | # provides UDP syslog reception | ||
| + | module(load="imudp") | ||
| + | input(type="imudp" port="514") | ||
| + | |||
| + | # provides TCP syslog reception | ||
| + | module(load="imtcp") | ||
| + | input(type="imtcp" port="514") | ||
| + | |||
$template Incoming-logs,"/var/log/devices/%FROMHOST-IP%.log" | $template Incoming-logs,"/var/log/devices/%FROMHOST-IP%.log" | ||
| + | :fromhost-ip, !isequal, "127.0.0.1" ?Incoming-logs | ||
| + | & ~ | ||
| + | |||
*.* @10.81.17.1:514 | *.* @10.81.17.1:514 | ||
</pre> | </pre> | ||
| + | |||
==restart rsyslog== | ==restart rsyslog== | ||
*systemctl restart rsyslog.service | *systemctl restart rsyslog.service | ||
Aktuelle Version vom 26. Februar 2018, 12:03 Uhr
On HP Procurve
- configure terminal
- logging facility syslog
- logging 10.82.0.120
On Syslog-Server
Add Lines
- vi /etc/rsyslog.conf
# provides UDP syslog reception module(load="imudp") input(type="imudp" port="514") # provides TCP syslog reception module(load="imtcp") input(type="imtcp" port="514") $template Incoming-logs,"/var/log/devices/%FROMHOST-IP%.log" :fromhost-ip, !isequal, "127.0.0.1" ?Incoming-logs & ~ *.* @10.81.17.1:514
restart rsyslog
- systemctl restart rsyslog.service
View Logs
- tail -f /var/log/devices/10.81.17.1.log