Skip to main content

setting snmpd di ubuntu n enterprise linux

-- info --

take a look on here to gain more experiance about it... :D

-- 1 --
first step all you have to do is preparation the software what is needed. on the way i will split it into 2 way, ubuntu and enterprise way.

-- ubuntu way --
install it with
$ sudo apt-get install snmpd snmp

make backup and edit file snmp.conf
#mv /etc/snmp/snmp.conf /etc/snmp/snmp.conf_old
#vi /etc/snmp/snmp.conf
this is the sample config of snmp.conf

# First, map the community name (COMMUNITY) into a security name
# (local and mynetwork, depending on where the request is coming
# from):

#  source          community
com2sec local     localhost        public
com2sec localNet   public
com2sec localhost localhost        public
#com2sec readonly  default         public
#com2sec readwrite default         private

# Second, map the security names into group names:

#               sec.model
group MyROSystem v1        local
group MyROSystem v2c       local
group MyROSystem usm       local
group MyROGroup v1         localNet
group MyROGroup v2c        localNet
group MyROGroup usm        localNet
group MyRWGroup v1         local
group MyRWGroup v2c        local
group MyRWGroup usm        local

# Third, create a view for us to let the groups have rights to:

#           incl/excl subtree                          mask
view all    included  .1                               80
view system included  .

also edit file /etc/default/snmpd
# This file controls the activity of snmpd and snmptrapd

# MIB directories.  /usr/share/snmp/mibs is the default, but
# including it here avoids some strange problems.
export MIBDIRS=/usr/share/snmp/mibs

# snmpd control (yes means start daemon).

# snmpd options (use syslog, close stdin/out/err).
#SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/'
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/'
# snmptrapd control (yes means start daemon).  As of net-snmp version
# 5.0, master agentx support must be enabled in snmpd before snmptrapd
# can be run.  See snmpd.conf(5) for how to do this.

# snmptrapd options (use syslog).
TRAPDOPTS='-Lsd -p /var/run/'

# create symlink on Debian legacy location to official RFC path
and restart service
/etc/init.d/snmpd restart

-- enterprise way --
install it using
# yum install net-snmp net-snmp-utils net-snmp-devel
make backup and edit file snmp.conf
#mv /etc/snmp/snmp.conf /etc/snmp/snmp.conf_old
#vi /etc/snmp/snmp.conf
this is a sample of snmp.conf
rocommunity  public
syslocation  "monitor DataCenter"
syscontact  sakti.dwi@localhost
com2sec notConfigUser default public
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
view systemview included .
view systemview included .
com2sec mynetwork mycommunity
group MyRWGroup v2c local
group MyROGroup v2c mynetwork
group MyRWGroup v2c otherv3user
view mib2 included fc                           
access MyROGroup "" any noauth 0 all none none
access MyRWGroup "" any noauth prefix all all all                              
com2sec notConfigUser default public
com2sec notConfigUser default public                                  
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser

and restart service
 /etc/init.d/snmpd restart

-- cek n jajal --
run this command
#snmpwalk -Os -c public -v 1 system

sysDescr.0 = STRING: Linux localhost.localdomain #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
sysObjectID.0 = OID: netSnmpAgentOIDs.10
sysUpTimeInstance = Timeticks: (925895) 2:34:18.95
sysContact.0 = STRING: sakti.dwi@localhost
sysName.0 = STRING: localhost.localdomain
sysLocation.0 = STRING: "monitor DataCenter"
sysORLastChange.0 = Timeticks: (17) 0:00:00.17
sysORID.1 = OID: snmpFrameworkMIBCompliance
sysORID.2 = OID: snmpMPDCompliance
sysORID.3 = OID: usmMIBCompliance
sysORID.4 = OID: snmpMIB
sysORID.5 = OID: tcpMIB
sysORID.6 = OID: ip
sysORID.7 = OID: udpMIB
sysORID.8 = OID: vacmBasicGroup
sysORDescr.1 = STRING: The SNMP Management Architecture MIB.
sysORDescr.2 = STRING: The MIB for Message Processing and Dispatching.
sysORDescr.3 = STRING: The management information definitions for the SNMP User-based Security Model.
and so on
this out put mean that snmpd is work

-- other chek --
this is monitoring tool that use snmp


Popular posts from this blog

Webalizer - Statistik trafik/kunjungan web (ubuntu)

make subdomain trafik statistik

run this command :
sudo apt-get install webalizeredit "/etc/apache2/apache2.conf" , set
HostnameLookups Off into :
HostnameLookups On
All we need is already prepared, now set log of vhost in "/etc/apache2/sites-enabled" to spesifict folder.
exp. $sudo vi /etc/apache2/sites-enabled/monitor CustomLog ${APACHE_LOG_DIR}/access.log into: CustomLog ${APACHE_LOG_DIR}/vhost/monitor/access.logrestart service
$sudo /etc/init.d/apache2 restart
create another file config of webalizer in /etc/webalizer
exp. vi /etc/webalier/monitor.conf
set the LogFile to apache2 logfile:
LogFile /var/log/apache2/vhost/monitor/access.log # apache log OutputDir /var/webalizer/monitor/ #webalizer report Incremental yes ReportTitle Usage statistics for HostName
create script to run webalizer via crontab
exp. vi /etc/webalizer/cron_job
#!/bin/bash echo "di jalankan pada: `date +"%d-%B-%Y %r"…

pgpoolAdmin, web interface for pgpool

next capter of pgpool from my last post ( here), now i wanna post about a tool that can manage pgpool from web interface called pgpoolAdmin. next... enjoy the post... ^_^

first we need to download pgpooladmin from here, extrak and copy or move to http directory( for exp : /var/www) 
$wget $tar zxvf pgpoolAdmin-3.0.3.tar.gz $sudo cp -Rf pgpoolAdmin-3.0.3 /var/www/test
install pgpooladmin via web on: http://localhost/test/install

make sure owner of that file is "www-data"(of course have write akses) and check again

login with user that you create on /etc/pcp.conf (for more detail see my last post

and done.ya.. tooo.......!!!

send oracle 11g audit log to syslog server ( on other PC)

well...... this time i will write about syslog, and for this experiment what we need is :
- kiwi syslog server get from here and install it on your PC( i use xp for this server syslog)
- oracle db
- and of course, a cup of coffee is a must and other thing that make you relax and comfortable ( :p )

first thing to do is redirect oracle audit log to syslog, and than from syslog send to syslog server( kiwi syslog)

 edit initSID.ora and add this folowing config :
create "/var/log/oracle/" firs
audit_file_dest='/var/log/oracle/' audit_trail='OS' AUDIT_SYSLOG_LEVEL=local1.warning after that edit /etc/syslog.conf, and add this folowing config :
#Save oracle rdbms audit trail to oracle_audit.log local1.warning /var/log/oracle/oracle_audit.log #Send oracle rdbms audit trail to remote syslog server local1.warning @ #<= ip your syslog server--2--
restart syslog service with command :
/sbin/service syslog restart …