On 2015-01-12 08:28, Per Jessen wrote:
Carlos E. R. wrote:
Could snmptrapd be used to simply write what it gets to a text file, so that I can look and find out if there is anything interesting there?
Yep, absolutely. In /etc/snmp/snmptrapd.conf you specify which script should be called for which trap, e.g.:
traphandle IF-MIB::linkUp <script> <arguments> traphandle IF-MIB::linkDown <script> <arguments>
traphandle default <script-to-write-to-log>
To have traps sent from other Linux boxes, install net-snmp and put "trapsink <your snmptrapd machine>" in /etc/snmp/snmpd.conf.
I simply have: authCommunity log,execute,net public authCommunity log,execute,net private I thought that would write things to the log. The log is created (/var/log/net-snmpd.log) but is empty. I noticed a packet coming, I saw it on the firewall log. I can't write a script to handle writing myself to the log if I absolutely have no idea what script to write or what is coming (I have no idea what the router sends, it is not documented at all)... I thought that the daemon would do the logging itself. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)