ClueNet is looking for a new Chief Technical Admin. More information here.

ClueNet:Common Services

From ClueWiki

(Redirected from Cluenet Common Services)
Jump to: navigation, search

There are several services which are common to most or all Cluenet servers. Here are short explanations for how to set them up.

Contents

[edit] Cron-Apt

This is for Debian servers. It can be installed by running the command "apt-get install cron-apt" and then modifying the /etc/cron-apt/config file to send emails to your own email address. The config line is around line 88.

[edit] Logwatch

On Debian, this can be installed with "apt-get install logwatch". Logwatch should be configured to send emails to your own email address. How to configure it depends on the distribution. On Debian, a file /etc/logwatch/conf/logwatch.conf with the contents:

MailTo = youremailaddress@cluenet.org
Detail = Low

Then test it by running the logwatch command and checking your email. Make sure to read your logwatch emails to make sure there is nothing out of the ordinary going on.

[edit] SNMP

SNMP is used for Cacti graphs.

[edit] /etc/snmp/snmpd.conf

Here is a config file to allow IPv6 SNMP. Be sure to change the syslocation and syscontact information at the bottom!

com2sec readonly default public
com2sec6 readonly default public
group MyROGroup v1 readonly
group MyROGroup v2c readonly
group MyROGroup usm readonly
view all included .1 80
access MyROGroup "" any noauth exact all none none
syslocation Cobi's datacenter
syscontact Cobi <cobi@cluenet.org>

[edit] /etc/default/snmpd

Here is Debian's initscripts config file for IPv6 SNMP.

SNMPDRUN=yes
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid udp6:161 udp:161'
TRAPDRUN=no
TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'

[edit] /etc/snmp/snmpd.options

On fedora, install the net-snmp package and create a file called /etc/snmp/snmpd.options and put this in it.

OPTIONS='-Lsd -Lf /dev/null -I -smux -p /var/run/snmpd.pid udp6:161 udp:161'

[edit] Forward Server Diagnostic Emails to Yourself

Edit /etc/aliases and change the root: entry at the bottom to point to your email address. Then run the command "newaliases".

[edit] MTA Smarthost

Use the cluenet smarthost for mail "mail.cluenet.org". On Debian, you can reconfigure exim with the command "dpkg-reconfigure exim4-config". Note that you will have to ask an admin to make sure your host is in the mailserver's relay allow list. On old versions of Debian, you may first have to run the command "apt-get install exim4" to replace the old version of exim that ships with Debian with the new version.

[edit] Syslog-ng with remote monitoring

ClueNet uses syslog-ng for advanced logging. To install this on Debian, simply apt-get install syslog-ng.

[edit] /etc/syslog-ng/syslog-ng.conf

Append the following to the end of /etc/syslog-ng/syslog-ng.conf on Debian systems for remote logging:

#IRC
destination dr_irc { udp("syslog.cluenet.org" port (3335)); };
filter f_irc { (level(notice..emerg) or facility(authpriv)) and not facility(cron); };
log { source(s_all); filter(f_irc); destination(dr_irc); };

On Red Hat/Fedora systems append the following to the end of /etc/syslog-ng/syslog-ng.conf:

#IRC
destination dr_irc { udp("syslog.cluenet.org" port (3335)); };
filter f_irc { (level(notice..emerg) or facility(authpriv)) and not facility(cron); };
log { source(s_sys); filter(f_irc); destination(dr_irc); };
Personal tools
Server information
Useless