Оглавление
- Basic setup of a SOHO server
- SoHo - Software repositories
- SoHo - Alias of loopback interface
- SoHo - IPtables configuration example
- SoHo - Webmin
- SoHo - DNS
- SoHo - VMWare
- SoHo - Windows
- SoHo - OpenVPN
- SoHo - Remote Desktop
- Nameserver on Windows XP forwarding to public DNS with private zones
- SoHO - NTP
- SoHo - SSH
- SoHo - Ubuntu prerequisites
- How to strengthen SSH
- Fixing Nessus complaints
- Java installation on RHEL 4
- Installing vsFTPd on CentOS
- How to setup CA (certificate authority)
- Installation of VIM X11 and archivers on RHEL 4 x86_64
- SoHo - MS & Open-Office
- User management
- CommuniGate Pro
- Backup
- Issue tracking for small groups
- Jabber setup and configuration
- Monitoring & Statistics
- Printing in SOHO
- Faxes in SOHO
- T38 Modem
- PostScript fonts for faxes
- Installing Brother MFU drivers on Ubuntu
- Installing Hylafax client on RHEL4 and Fedora
- Installing Hylafax server on RHEL4
- Installing Hylafax server on Ubuntu
- Integrating Hylafax with CUPS
- Integrating Hylafax with CommuniGate
- Managing Hylafax from Ubuntu client
- How to test faxing
- Drivers for Brother MFUs
- Brand new idea about faxing
- External faxing resources
- Antivirus & Antispam
- Obtaining sample antivirus files
- Clamav on CentOS
- SpamAssassin
- CGPAV: how to integrate antivirus with CommuniGate
- SpamAssassin accessibility
- Antispam settings in CommunigatePro
- Antivirus and Nagios adjustments
- Config files and scripts for antivirus and antispam
- GreyListing (eserv.ru)
- Greylisting: панацея от спама или мыльный пузырь?
- Неприступный почтовый сервер, или жизнь без спама
- External SOHO References
- Supplementary SOHO procedures
MRTG
MRTG Setup
Install packages
yum install -y mrtg
Disable in virtual hosts
cd /etc/httpd/conf.d mv mrtg.conf mrtg.conf.disable
Verify the mrtg clause of apache config
Edit configuration file /etc/mrtg/mrtg.cfg.
Restore long "Target" and "LocaMIBs" lines which are splitted in the example. Replace "< h1>" by "<h1>" (blanks were inserted deliberately to shut up wiki complaints).
Adjust storage and interface indexes. verify them using this query
snmpwalk -v2c localhost -c gcpub hrStorageDesc
Verify correctness of the file:
env LANG=C mrtg /etc/mrtg/mrtg.cfg --check
Create index page
env LANG=C indexmaker /etc/mrtg/mrtg.cfg > /var/www/mrtg/index.html
Warm-up mrtg (when run for the first 2-3 times, it displays errors) and make initial graphs by running mrtg a few times:
env LANG=C mrtg /etc/mrtg/mrtg.cfg env LANG=C mrtg /etc/mrtg/mrtg.cfg env LANG=C mrtg /etc/mrtg/mrtg.cfg
Fix /etc/cron.d/mrtg:
*/5 * * * * root /bin/env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
--lock-file /var/lock/mrtg/mrtg_l
--confcache-file /var/lib/mrtg/mrtg.okMRTG Extensions
MRTG Polling script for NTP
I developed ntpstat.pl to show current NTP deltas.
MRTG Bugs
SNMPv3 bug
mrtg-2.14-5 distributed with CentOS 5 contains a bug. It uses one of two Perl SNMP interfaces via the mrtg.pm module: Net::SNMP or plain SNMP.The module tries to use Net::SNMP if it is available and initializes it. Later mrtg checks EnableSNMPv3 config parameter, and if it is "no", it additionally loads plain SNMP. Thus, initialization is ignored, including list of MIBs to be loaded.As as result, symbolic MIB names are ignored. As a workaround, always set EnableSNMPv3: yes
Duplicate IP address detected
SNMPd daemon prints on startup
Duplicate IP address detected, some interfaces may not be visible in IP-MIB
I performed SNMP walk to see which interfaces it publishes
$ snmpwalk -v2c localhost -c vnpub .1.3.6.1.2.1.2.2.1.2 IF-MIB::ifDescr.1 = STRING: lo IF-MIB::ifDescr.3 = STRING: venet0 IF-MIB::ifDescr.7 = STRING: tun0
And checked indexes assigned to IP addresses
$ snmpwalk -v2c localhost -c vnpub .1.3.6.1.2.1.4.20.1 | grep EntAddr IP-MIB::ipAdEntAddr.10.30.0.1 = IpAddress: 10.30.0.1 IP-MIB::ipAdEntAddr.127.0.0.1 = IpAddress: 127.0.0.1 IP-MIB::ipAdEntAddr.4.2.5.6 = IpAddress: 4.2.5.6
Then compared with the ifconfig output
$ ifconfig -a | grep Link
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.30.0.1 P-t-P:10.30.0.2 Mask:255.255.255.255
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255
venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:4.2.5.6 P-t-P:4.2.5.6 Bcast:4.2.5.6 Mask:255.255.255.255So actually it was not a SNMP problem but an OpenVZ feature: the venet0 interface was an alias to loopback.

Комментарии
Отправить комментарий