How to enable SNMP?

Hello,

How to enable SNMP on FreePBX 13 Distro?
I try yum install snmpd, but no success:

[root@server ~]# yum install snmpd
Loaded plugins: fastestmirror, kmod
Setting up Install Process
Loading mirror speeds from cached hostfile
base | 2.0 kB 00:00
extras | 1.3 kB 00:00
pbx | 2.9 kB 00:00
schmooze-commercial | 2.9 kB 00:00
updates | 1.3 kB 00:00
No package snmpd available.
Error: Nothing to do

You can install it with:

yum install net-snmp

Thank you, now i can monitor Uptime via SNMP.
But cannot monitor network interface traffic. Why?

You probably don’t have the correct Asterisk MIB installed. This is an SNMP question, not a FreePBX question. Perhaps asking in an SNMP forum will get you some more complete answers.

Enable SNMP in FreePBX Distro

yum install net-snmp.x86_64

but, in my case, the startup script was not installed…
so i had to create my /etc/snmp/snmpd.conf

rocommunity public
syslocation Metron6, Kalamaria, Thessaloniki
_syscontact George _
disk /

and i had to create the startup script in /etc/init.d/snmpd

this is the script:

#!/bin/bash

ucd-snmp init file for snmpd

chkconfig: - 50 50

description: Simple Network Management Protocol (SNMP) Daemon

processname: /usr/sbin/snmpd

config: /etc/snmp/snmpd.conf

config: /usr/share/snmp/snmpd.conf

pidfile: /var/run/snmpd

source function library

. /etc/init.d/functions

OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd.pid -a"
if [ -e /etc/sysconfig/snmpd.options ]; then
. /etc/sysconfig/snmpd.options
fi

RETVAL=0
prog=“snmpd”

start() {
echo -n $"Starting $prog: "
if [ $UID -ne 0 ]; then
RETVAL=1
failure
else
daemon /usr/sbin/snmpd $OPTIONS
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/snmpd
fi;
echo
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
if [ $UID -ne 0 ]; then
RETVAL=1
failure
else
killproc /usr/sbin/snmpd
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/snmpd
fi;
echo
return $RETVAL
}

reload(){
echo -n $"Reloading $prog: "
killproc /usr/sbin/snmpd -HUP
RETVAL=$?
echo
return $RETVAL
}

restart(){
stop
start
}

condrestart(){
[ -e /var/lock/subsys/snmpd ] && restart
return 0
}
case “$1” in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
condrestart)
condrestart
;;
status)
status snmpd
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
RETVAL=1
esac

exit $RETVAL

Can you put that into a code block? The HTMLized version you sent out isn’t going to help a lot of people.