How Ubuntu server prevents SNMPD from logging to Syslog

Source: Internet
Author: User
Tags snmp syslog system log

The company is using Ubuntu server, with cacti to do the monitoring, through the SNMPD protocol monitoring, but when looking at the system log, SNMPD generated a lot of logs, sometimes to turn a lot of screen, to see system information, this to every day to see the System log Administrator, It was a nightmare. The following methods allow you to turn off SNMPD to the system log file so that the system log looks much simpler.

root@ubuntu:~#  vim/etc/default/snmp 
     
# This file controls the activity of SNMPD and SNMPTRAPD 
     
# Don ' t load any MIBs by default. 
# You might comment this lines once you have the MIBs downloaded. 
Export mibs= 
     
# SNMPD control (yes means start daemon). 
Snmpdrun=yes 
     
# SNMPD options (use Syslog, close stdin/out/err). 
#SNMPDOPTS = '-lsd-lf/dev/null-u snmp-g snmp-i-smux-p/var/run/snmpd.pid '  //commented out, change to the following 
snmpdopts= '-ls2d-l F/dev/null-p/var/run/snmpd.pid-a '

After the completion of the command to restart the SNMPD service, so look at the system log, it is much more refreshing.

#/ETC/INIT.D/SNMPD Restart//Restart service

SNMPD the definition of log level:

0 or! --Log_emerg, 
1 or a--Log_alert, 
2 or c--Log_crit, 3 or e--log_err, 
4 or w--log_warning, 
5 or n-- Log_notice, 
6 or i--log_info, and 
7 or d--log_debug.

This article comes from "Acridine a Pooh" blog, please be sure to keep this source http://gm100861.blog.51cto.com/1930562/883407

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.