0

I want to log snmpd logs by syslog-ng. I added below lines in syslog-ng.conf file

filter f_snmpd { program("snmpd"); };

destination df_snmpd { file("/var/log/snmplog"); };

log {

    source(s_all);
    filter(f_snmpd);
    destination(df_snmpd);
};

But the above code is only capturing standard output logs liek below:

Feb 4 17:21:31 snmpd[1612]: snmpd: send_trap: Failure in sendto (Network is unreachable)

But I want more logs for snmpd. Please tell me how to collect all the logs of snmpd daemon through syslog-ng ?

Thanks

BhushanK
  • 1,205
  • 6
  • 23
  • 39
user3990393
  • 193
  • 7

1 Answers1

1

if your s_all source collects every relevant syslog message, then the problem is probably that snmpd does not log more. Check your snmpd configuration, and try to increase its log level (there is a list of snmpd log levels here: https://serverfault.com/questions/310640/reduce-snmpd-logging-verbosity )

HTH,

Robert

Community
  • 1
  • 1
Robert Fekete
  • 557
  • 3
  • 5