1. Skip to Menu
  2. Skip to Content
  3. Skip to Footer>
Image 1

WE Solutions / Our services

  • Previous
  • Next
  • Stop
  • Play

SAMBA/LDAP

Thin Client Server

Postfix Mail Server

Postfix Mail Server

HA Clustering

Nagios

PDF Print E-mail

Written by Mr. Sontaya Photibut Saturday, 02 May 2009 15:53

การติดตั้ง Nagios 3.0 และ Nagios-plugins (Host and Service Monitoring)

Nagios-plugins คือ เป็น Plugins ที่ใช้ในการตรวจ system, memory usage, cpu utilization อื่นๆ เป็นต้น.

สำหรับท่านไหนที่เลยติดตั้งจาก YaST แล้วต้อง Uninstall โปรแกรมออกก่อนนะครับ

- nagios

- nagios-nsca

- nagios-nsca-client

- nagios-plugins

- nagios-plugins-extras

- nagios-www

สำหรับท่านไหนที่ยังไม่ได้ติดตั้ง ก็ไม่ต้องสนใจด้านบนครับ

ตรวจสอบโปรแกรมว่าคุณติดตั้งไปยัง

- gd-devel

- libpng-devel

1. ดาวห์โหลดโปรแกรม

- nagios-3.0b6.tar.gz    download : http://www.nagios.org/download

- nagios-plugins-1.4.10.tar.gz downlaod : http://sourceforge.net

- http://software.susethailand.com/

$ cd เข้าไปยัง folder ที่คุณเก็บโปรแกรมไว้

$ tar -zxvf nagios-3.0b6.tar.gz

$ tar -zxvf nagios-plugins-1.4.10.tar.gz


2. สร้าง user และ group

$ useradd -m nagios

$ groupadd nagios

$ groupadd nagcmd

$ usermod -G nagios,nagcmd nagios

$ usermod -G nagcmd wwwrum

 

3. ติดตั้ง Nagios 3.0

$ cd /nagios-3.0b6

$ ./configure --prefix=/opt/nagios --with-cgiurl=/nagios/cgi-bin --with-htmurl=/nagios --with-nagios-user=nagios \

--with-nagios-group=nagios --with-command-group=nagcmd

$ make all

$ make install

$ make install-init

$ make install-commandmode

$ make install-config

$ make install-webconf

 

4. ติดตั้ง Nagios Plugins 1.4.10

$ cd nagios-plugins-1.4.10

$ ./configure --prefix=/opt/nagios --with-nagios-user=nagios --with-nagios-group=nagios

$ make

$ make install

 

5. คอนฟิก Nagios 3.0

$ vi /opt/nagios/etc/nagios.cfg

log_file=/var/opt/nagios/nagios.log

object_cache_file=/var/opt/nagios/objects.cache

precached_object_file=/var/opt/nagios/objects.precache

status_file=/var/opt/nagios/rw/nagios.cmd

lock_file=/var/opt/nagios/nagios.tmp

log_archive_path=/var/opt/nagios/archive

check_result_path=/var/opt/nagios/spool/retention.dat

state_retention_file=/var/opt/nagios/retention.dat

debug_file=/var/opt/nagios/nagios.debug

 

6. สร้าง Directories

$ mkdir -p /var/opt/nagios/rw

$ mkdir -p /var/opt/nagios/spool/checkresults

$ mkdir -p /var/opt/nagios/archives

$ chown -R nagios.nagios /var/opt/nagios

$ chown -R nagios.nagcmd /var/opt/nagios/rw

$ chmod 2775 /var/opt/nagios/rw

 

7. Apache Security

$ htpasswd2 -c /opt/nagios/etc/htpasswd.users sysadmin

Password : Your_password


8. Apache และ Nagios Startup

$ rcapache2 restart

$ /etc/rc.d/init.d/nagios start

 

9. Automatic Startup at systerm boot time

$ insserv nagios


10. ทดสอบการทำงาน

URL: http://<IP Address Server>/nagios

Username is "sysadmin"

Password is "Your_password"

 

Nagios Error: Could not open command file '/var/nagios/rw/nagios.cmd' for update!

Solution: change group from "nagios" to "www"
$ id nagios
$ cd /opt/nagios/var/rw/
$ chgrp www nagios.cmd


Adding remote Linux/Unix hosts:

ตัวอย่าง (Defalut)
$ vi /opt/nagios/etc/objects/localhost.cfg

##Added by Sontaya
define host {
use                     linux-server
host_name               hostname
alias                   hostname.mydomain
address                 Public IP Address / Private IP Address
}

define service {
use                     local-service
host_name               hostname
service_description     PING
check_command           check_ping!100.0,20%!500.0,60%
}

define service {
use                     local-service
host_name               hostname
service_description     SSH
check_command           check_ssh
}

# Define a service to check the disk space of the root partition
# on the local machine.  Warning if < 20% free, critical if
# < 10% free space on partition.

define service{
use                             local-service
host_name                       hostname
service_description             Root Partition
check_command                   check_local_disk!20%!10%!/
}

# Define a service to check the number of currently logged in
# users on the local machine.  Warning if > 10 users, critical
# if > 20 users.

define service{
use                             local-service
host_name                       hostname
service_description             Current Users
check_command                   check_local_users!15!20
}

define service{
use                             local-service
host_name                       hostname
service_description             Total Processes
check_command                   check_local_procs!250!400!RSZDT
}

define service{
use                             local-service
host_name                       hostname
service_description             Current Load
check_command                   check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
}

# Define a service to check the swap usage the local machine.
# Critical if less than 10% of swap is free, warning if less than 20% is free

define service{
use                             local-service         ; Name of service template to use
host_name                       hostname
service_description             Swap Usage
check_command                   check_local_swap!20!10
}


Adding email contacts:

$ vi /opt/nagios/etc/objects/contacts.cfg
email                     nagios@hostname, admin@mydomain.com

Restart nagios:
$ /etc/rc.d/init.d/nagios restart

Ref:
http://nagios.sourceforge.net/docs/3_0/plugins.html
http://www.novell.com/coolsolutions/feature/16723.html
http://code.google.com/p/onebusaway/wiki/NagiosConfiguration#Nagios_User_and_Group

 

ติดตั้ง NRPE บนเครื่อง Remote Hosts  (Client): Daemon and plugin for executing plugins on remote hosts

โดยปกติแล้วการ monitor จะเป็นการรันผ่าน plugins ที่ Nagios Server ไปยังเครื่องที่ต้องการจะ monitor โดยส่วนมากเป็นการส่ง message
ไปและ response กลับมา เช่น plugins check_ping , check_http แต่การ monitor บางอย่างไม่สามารถใช้วิธีนี้ได้
เช่น check_load , check_disk เป็นต้น ซึ่ง plugins เหล่านี้สามารถทำงานได้ในเครื่อง local เท่านั้น.

ไฟล์ที่สำคัญ:
check_nrpe คือ Plugin ที่ใช้ในการจัดการ nrpe บนเครื่อง remote host.
nrpe       คือ Agent ที่รันบนเครื่อง remote host และใช้ในการติดต่อกับ plugin.
nrpe.cfg   คือ ไฟล์คอนฟิกของเครื่อง remote host

1. สร้างบัญชีผู้ใช้/กลุ่มผู้ใช้


$ useradd nagios
$ passwd nagios
กำหนดรหัสผ่านเป็น "nagios"
$ groupadd nagios

2. ดาวห์โหลด Nagios Plugins:

$ mkdir -p /opt/nagios/
ดาวห์โหลดไฟล์ และบันทึกลงไว้ที่ "/opt/nagios/" ดาวห์โหลดจาก
http://www.nagios.org/download/download.php
(nagios-plugins-1.4.13.tar.gz)

$ tar zxvf nagios-plugins-1.4.13.tar.gz

3. ติดตั้ง Nagios Plugins

*** ตรวจสอบ openssl-devel ว่าติดตั้งยัง ถ้ายังให้ทำการติดตั้งจาก YaST ก่อน เพราะ plugin สนับสนุน ssl.

$ cd nagios-plugins-1.4.13
$ ./configure --with-nagios-user=nagios --with-nagios-group=nagios
$ make
$ make install

4. กำหนด permissions โฟร์เดอร์ plugin:

$ chown nagios.nagios /usr/local/nagios
$ chown -R nagios.nagios /usr/local/nagios/libexec

5. ติดตั้ง NPRE Daemon

ดาวห์โหลดไฟล์ และบันทึกลงไว้ที่ "/opt/nagios/" ดาวห์โหลดจาก
http://www.nagios.org/download/download.php
(nrpe-2.12.tar.gz)

$ tar zxvf nrpe-2.12.tar.gz
$ cd nrpe-2.12
$ ./configure
$ make all
$ make install-plugin
$ make install-daemon
$ make install-daemon-config
$ make install-xinetd

6. คอนฟิกพอร์ต NRPE

$ vi /etc/xinetd.d/nrpe

เพิ่ม IP Address Nagios ในบรรทัด
only_from       = 127.0.0.1 192.168.1.13

จากนั้นบันทึกไฟล์

$ vi /etc/services

ทำการเพิ่มพอร์ต 5666 เข้าในไฟล์ services
nrpe            5666/tcp        # NRPE

รีสตาร์ Xinetd
$ rcxinetd restart

ตรวจสอบ NRPE daemon

$ netstat -at | grep nrpe
tcp        0      0 *:nrpe                  *:*                     LISTEN

ทดสอบเวอร์ชั่นของ NRPE
$ /usr/local/nagios/libexec/check_nrpe -H localhost
NRPE v2.12

7. คอนฟิก Firewall (iptables)

ทำการเปิดพอร์ต 5666
$ iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 5666 -j ACCEPT
ตรวจสอบ
$ netstat -ntlp | grep 5666
tcp        0      0 0.0.0.0:5666            0.0.0.0:*               LISTEN      -

Tip:
$ vi /etc/sysconfig/scripts/SuSEfirewall2-custom
#NRPE
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 5666 -j ACCEPT

$ rcSuSEfirewall2 reload

8. แก้ไขไฟล์ nrpe.cfg

$ vi /usr/local/nagios/etc/nrpe.cfg
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
command[check_disk]=/usr/local/nagios/libexec/check_disk -w 20% -c 10%
command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200

*** สามารถสร้าง command ได้ 2 แบบ คือ กำหนดค่า argument กับไม่กำหนดค่า argument
(ในตัวอย่างนี้ใช้แบบกำหนดค่า argument คือส่งค่า threshold หรือรับค่า argument มาจากเครื่อง Nagios Server)

===================================================================================
คอนฟิก Nagios Server
===================================================================================
1. ทดสอบ Telnet

ทดสอบ telnet เข้าเครื่อง Remote host (Client)

$ telnet 192.168.11.3 5666
Trying 192.168.11.3...
Connected to 192.168.11.3.
Escape character is '^]'.
^]
telnet> quit
Connection closed.


2. คอนฟิกไฟล์ commands.conf


$ /opt/nagios/etc/objects/commands.cfg

# NRPE CHECK COMMAND
# Command to use NRPE to check remote host systems
#
###############################################################################
#
define command{
command_name   check_nrpe
command_line   $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}

*** เราสามารถสร้าง command ไว้ 2 ตัวได้ แยกส่วนเวลาเรียกใช้งานแบบส่งและไม่ส่ง argument.


3. คอนฟิกไฟล์ host-linux.cfg

รูปแบบการกำหนดค่า check_nrpe!command plugins!argument threshold1 arg2 arg3
check_nrpe!check_procs!5 !10 !Z

Tip: ระหว่าง argument ให้เว้นวรรค

$ /opt/nagios/etc/objects/host-linux.cfg

#----------------------------------------------------------------------------------------------------------------
#192.168.11.3
#----------------------------------------------------------------------------------------------------------------

define host {
use                     linux-server
host_name               bclinux3
alias                   bclinux3.mydomain
address                 192.168.11.3
hostgroups              linux-servers
}

#CRITICAL if the round trip average (RTA) is greater than 600 milliseconds
#or the packet loss is 60% or more
#WARNING if the RTA is greater than 200 ms or the packet loss is 20% or more
#OK if the RTA is less than 600 ms and the packet loss is less than 20%
define service {
use                     generic-service
host_name               bclinux3
service_description     PING
check_command           check_ping!200.0,20%!600.0,60%
}

# Define a service to check the disk space of the root partition
# on the local machine.  Warning if < 20% free, critical if
# < 10% free space on partition.

define service{
use                 generic-service
host_name           bclinux3
service_description Free Root Partition
check_command       check_nrpe!check_disk -w 20% -c 10% -p /dev/sda2
}

# Define a service to check the number of currently logged in
# users on the local machine.  Warning if > 5 users, critical
# if > 10 users.

define service{
use                             generic-service
host_name                       bclinux3
service_description             Current Users
check_command                   check_nrpe!check_users -w 5 -c 10
}

define service{
use                             generic-service
host_name                       bclinux3
service_description             Total Processes
check_command                   check_nrpe!check_total_procs
}

define service{
use                             generic-service
host_name                       bclinux3
service_description             Current Load
check_command                   check_nrpe!check_load -w 15,10,5 -c 30,25,20
}

define service{
use                           generic-service
host_name                     bclinux3
service_description           Zombie Processes
check_command                 check_nrpe!check_zombie_procs
}

บันทึกไฟล์

Tip:
Usage:check_users -w <users> -c <users>
-w, --warning=INTEGER
Set WARNING status if more than INTEGER users are logged in
-c, --critical=INTEGER
Set CRITICAL status if more than INTEGER users are logged in

ตรวจไฟล์คอนฟิก:
$ /opt/nagios/bin/nagios -v /opt/nagios/etc/nagios.cfg

ถ้าไม่มี error ให้รีสตาร์ Nagios

Restart Nagios:
$ /etc/rc.d/init.d/nagios reload

=========================================================================
Note: Object configuration files:
=========================================================================

Timeperiods:
$ vi /opt/nagios/etc/objects/timeperiods.cfg

Contacts/Contacts groups:
$ vi /opt/nagios/etc/objects/contacts.cfg
#Adding email contacts:
email                     nagios@hostname, sontaya@mydomain.com

Adding remote Linux/Unix hosts:
$ vi /opt/nagios/etc/objects/host-linux.cfg

Templates Services: (CONTACT, HOST, SERVICE)
$ vi /opt/nagios/etc/objects/templates.cfg

COMMANDS
:
$ vi /opt/nagios/etc/objects/commands.cfg


Restart nagios:
$ /etc/rc.d/init.d/nagios restart

Path plugins:

$ vi /opt/nagios/etc/resource.cfg
$USER1$=/opt/nagios/libexec

Path NRPE config
$ vi /usr/local/nagios/etc/nrpe.cfg

Usage:check_ping -H <host_address> -w <wrta>,<wpl>% -c <crta>,<cpl>%
check_command           check_ping!100.0,20%!500.0,60%

===========================================================================
Tip: How to check a host, that for security reasons has ping disabled
===========================================================================

1. Copy "check_nrpe" file to path plugin.
$ cp /usr/local/nagios/libexec/check_nrpe /opt/nagios/libexec

2. Define the service and attributes within the default services file.
(place check_nrpe! in front of the check-host-alive)

$ vi /opt/nagios/etc/objects/templates.cfg
## SERVICE TEMPLATES
check_command                   check_nrpe!check-host-alive

4. Add the command to every client’s nrpe.cfg file
$ vi /usr/local/nagios/etc/nrpe.cfg

3. Reload Nagios (Finished)
$ /etc/rc.d/init.d/nagios reload

===========================================================================
Error messages:
===========================================================================

Could not open command file '/var/nagios/rw/nagios.cmd' for update!

Solution: change group "nagios" to "www"
$ id nagios
$ cd /opt/nagios/var/rw/
$ chgrp www nagios.cmd


============================================================================
Tip & Install NagiosGrapher
============================================================================

Install NagiosGrapher.
Download: www.nagiosforge.org

$ tar xvf NagiosGrapher-1.7.1.tar.gz
$ autoconf
$ ./configure --with-layout=default
checking for gawk... gawk
checking for perl... /usr/bin/perl
checking distribution... found suse_linux
checking for layout... default
checking layout: directory prefix... set to '/usr/local/nagios'
checking for init_scripts/nagios_grapher.suse_linux... no
checking if user www-data exists... not found
checking if user www exists... not found
checking if user apache exists... not found
checking if user httpd exists... not found
checking if user nobody exists... found
checking if group www-data exists... not found
checking if group www exists... found
configure: creating ./config.status
config.status: creating Makefile
config.status: creating bin/collect2.pl
config.status: creating bin/fifo_write.pl
config.status: creating lib/NagiosGrapher.pm
config.status: creating lib/NagiosGrapher/HTML.pm
config.status: creating lib/NagiosGrapher/Hooks/Generic.pm
config.status: creating lib/NagiosGrapher/Hooks/SrvExtWriteHostextInfo.pm
config.status: creating sbin/graphs.cgi
config.status: creating sbin/rrd2-graph.cgi
config.status: creating sbin/rrd2-system.cgi
config.status: creating nagios_grapher
config.status: creating cfg/ngraph.ncfg
config.status: creating cfg/logrotate/nagios_grapher

$ make testdeps
/usr/bin/perl ./tools/testdeps.pl
Checking Data::Dumper ... found
Checking File::Copy ... found
Checking File::Basename ... found
Checking Carp ... found
Checking POSIX ... found
Checking Time::HiRes ... found
Checking Time::Local ... found
Checking Storable ... found
Checking GD ... not installed!
Checking Image::Magick ... not installed!
Checking RRDs ... found
Checking CGI ... found
Checking CGI::Carp ... found
Checking IO::Handle ... found
Checking URI::Escape ... found
Checking Calendar::Simple ... not installed!
make: *** [testdeps] Error 1

จะเห็นว่ามี 3 modules ที่ยังไม่ได้ติดตั้ง ให้ทำการติดตั้งผ่าน CPAN แล้วรันคำสั่งอีกที.
$ cpan install Image::Magick
ถ้าติดตั้งไม่ผ่าน ให้โหลดไฟล์ rpm จาก http://software.susethailand.com
$ rpm -ivh --nodeps perl-PerlMagick-6.2.5-16.29.x86_64.rpm

$ cpan install Calendar::Simple
$ cpan install GD

$ make install

Configuration:

$ vi /usr/local/nagios/etc/ngraph.ncfg

interface          file
perffile_path      /usr/local/nagios/var


$ vi /opt/nagios/etc/nagios.cfg

#NagiosGrapher
cfg_dir=/usr/local/nagios/etc/serviceext

process_performance_data=1
service_perfdata_file=/usr/local/nagios/var/service-perfdata
service_perfdata_file_template=$HOSTNAME$\t$SERVICEDESC$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\t$TIMET$\n
service_perfdata_file_mode=a
service_perfdata_file_processing_interval=30
service_perfdata_file_processing_command=process-service-perfdata-file

$ vi /opt/nagios/etc/objects/commands.cfg

define command{
command_name process-service-perfdata-file
command_line mv /usr/local/nagios/var/service-perfdata /usr/local/nagios/var/service-perfdata.$TIMET$
}


NagiosGrapher Templates:

#Copy the template file to the ngraph.d directory

$ cd /usr/local/nagios/etc/ngraph.d/templates/standard

$ cp check_ping.ncfg ../../../ngraph.d/check_ping.ncfg

Restart the NagiosGrapher:

$ /etc/init.d/nagios_grapher stop
$ /etc/init.d/nagios_grapher start

Reload Nagios:


$ /etc/init.d/init.d/nagios reload


Ref.
http://www.novell.com/coolsolutions/feature/19807.html
http://www.novell.com/coolsolutions/feature/16723.html
http://www.nagioswiki.org/wiki/HowTos:BestPractice:NagiosGrapher#ngraph.ncfg
https://www.nagiosforge.org/gf/project/nagiosgrapher/frs/?action=index


Comments (0)Add Comment

Write comment

security code
Write the displayed characters


busy
 

SUSE Linux Enterprise Cool Solutions

  • ovpnstatd
    license: 
    GNU General Public License

    About:

    How 'ovpnstatd' works.

    ovpnstatd is a status collector daemon for OpenVPN. ovpnstatd can be started either interactively at the console or as a daemon in the background (--daemon).

    Use "--help", to get a brief listing of available options.

    If started interactively, all connected users and their update-events will be shown on the console-display. This start-mode is merely meant for testing/debugging.

    A tcp-port (50505) will be opened, by which a very simple but useful web page can be viewed (http://yourhost:50505). There you get an entry for every OpenVPN-user, whose status-data is available as a result of a connect-event since ovpnstatd's startup. Users who are online, appear as a light-green(ish) entry, disconnected users are shown in grey/white.

    The web page will remain empty, as long as no users have connected since startup of ovpnstatd.

    The web page is intended for internal (administrator) use only - no "mass media", as ovpnstatd is not a multi-threaded program.

    Should ovpnstatd already be running in the background, then you would have to change the port number (--tcp-port <NNNNN>) for your interactive session (if you really want it twice).

    Only if started as daemon, ovpnstatd will serve its main purpose, it will collect data of all connect, disconnect, update events, which are reported by any OpenVPN server-process, and write history in csv-format, that can easily be loaded into a database or viewed in a spread-sheet.

    In the same time, this data is also written to a FIFO-file "/<status_dir>/send_nsca_data" (/var/run/openvpn/send_nsca_data) in a format suitable for nagios's "send_nsca" utility.

    The default location, where collector-data is written, is /srv/www/apps/ovpnstat/datacol - it can be changed with:
    "--collect-dir <path-to-your-collector-directory>".

    The location where event-data of OpenVPN-hooks is expected, is "/var/run/openvpn". This can be changed with the option:
    "--status-dir <path-to-Your-status-directory>".

    NOTE: For this to work, you also have to turn on status-logging in OpenVPN config-file(s): "status <path-to-status-data.status>" AND activate the hooks: "client-connect <your-con-script.sh>" and: "client-disconnect <your-dis-script.sh>"

    Into the hook-script "your-script.sh" simply place/add the following echo command:

    into "client-connect.sh" add the lines
    echo -e "OVPN_PID=$PPID\n`env`" \
    >/var/run/openvpn/${common_name}.con

    into "client-disconnect.sh" add the lines
    echo -e "OVPN_PID=$PPID\n`env`" \
    >/var/run/openvpn/${common_name}.dis

    NOTE: The extension of hook output-files has to be
         .con for client-connect data-files
         .dis for client-disconnect data-files
         .status for status data-files given in OpenVPN config-file
    otherwise those files will not be recognized by ovpnstatd.

    You can display your favoured icon as a header of the web page.

    As default for this, a built-in OpenVPN-icon is displayed.

    If you want to replace the default icon in the source (ovpnstatd.h) look for variable "def_web_img64" and substitute its assignment by the output of "base64 -w0 <your-preferred-image>".
    But only take tiny images for this !!!

    If the TUN/TAP device driver control is not "/dev/net/tun" on your Linux-System, change it with: "--dev-node <Your tun/tap ctrl>"

    In case you want to raise the debug-level, use "--debug <N>"
    Level 0 = off, 1 = default, 2 = all

    Installation:

          # assuming that You've downloaded the tar-file to /usr/local/src
          # proceed als follows:
    
          cd /usr/local/src
          tar -xjvf ovpnstat.tar.bz2
          cd ovpnstat
          make clean
          make
    
          # Now for a test start openvpn status collector daemon interactively :
          bash ovpnstatd-test.sh
          
          # If You got an OpenVPN server up and running on the same host
          # then You can already take a look on the web-page
    
          firefox http://your-host-name:12345/
    
          # But NOTE: ovpnstatd must run on the SAME HOST, where openvpn-server is on
    
          # Also note, that collector-data is only written, if the program
          # is started in the background (--daemon ) .
    
          # So to start it for "normal" usage copy file into place:
          cp init-ovpnstatd /etc/init.d/ovpnstatd
          cp ovpnstatd /usr/sbin/ovpnstatd
    
          # only if You want to send data to Nagios, otherwise leave this away:
          cp send_nsca.sh
    
          # You also will have to create the collector directory
          # if this location does not meet Your needs, just modify STARTOPTS
          # in /etc/init.d/ovpnstatd and set --collect-dir to Your favoured 
          mkdir -p /srv/www/apps/ovpnstat/datacol
    
          # then start openvpn status daemon
          /etc/init.d/ovpnstatd start
    	  
    	  

    Special hints:

    Regarding Nagios NSCA:

    Before you use the Nagios notification script "send_nsca.sh", you need to edit it - change the ip of the Nagios host therein - have a look if all the path-names are suiting your needs - AND install the "send_nsca" binary. It comes with package nagios-nsca-<version>

    Once you have installed nagios-nsca on the Nagios server, you may just copy send_nsca from there to your openvpn-server (including its config-file) - that's all it needs.

    Also add a Nagios configuration - a hostname entry for your openvpn-server where ovpnstatd will be running (must match exactly the output of 'hostname' and a service entry for each common-name (service_description must match common-name), that you want to monitor passively.

    An example of a passive service config also is included here.

    Regarding collector data:

    The collector data is in csv format which allows you to easily load it into some database for your own web application.

    Bugs (and the like creepers):

    ovpnstatd is tested valgrind-clean and is running stable since quite a couple of months now on my openvpn-server.

    AttachmentSize
    ovpnstat.tar.bz255.34 KB
  • supportconfig for Linux
    download url: 
    http://download.opensuse.org/repositories/Novell:/NTS/SLE_10/noarch/
    license: 
    GPLv2
    home page url: 
    http://en.opensuse.org/Supportutils

    Description

    The updateSupportutils command compares the current versions of supportutils and its plugins to those installed on your server. Those that are outdated or missing are automatically downloaded and installed. Only those plugins that apply to your server are installed. The command supports creating a weekly or monthly cron entry to automatically check and update the supportutils package and its plugins. Click here to see a list of the current supportutils and plugin packages. The updateSupportutils command help screen follows:

    ################################################################
    # Supportutils Auto Update Client
    ################################################################
    
    Usage: updateSupportutils [OPTION]
    
    Description
      Makes sure the supportutils and supportutils plugin packages are
      installed and current.
    
    Options
      -m  Install a monthly cron for updateSupportutils
      -w  Install a weekly cron for updateSupportutils
      -d  Delete all installed cron entries for updateSupportutils
      -l  List all cron entries for updateSupportutils
      -u  Force RPM update on applicable packages
      -p  Exclude supportutils plugin packages
      -v  Verbose mode
      -h  This screen

    Note: Detailed system information and logs are collected and organized in a manner that helps reduce service request resolution times. Private system information can be disclosed when using this tool. If this is a concern, please prune private data from the log files. Several startup options are available to exclude more sensitive information. Refer to the supportconfig(8) man page to see these options.

    Update Instructions

    Run updateSupportutils as root.

    If you do not already have the supportutils-plugin-updater package installed, refer to the Installation Instructions below. If your server does not have network connectivity to http://download.opensuse.org, then install using the Option B (Manual) method.

    Installation Instructions

    Option A (Automated)

    1. Download the supportutils-plugin-updater
    2. Login as root
    3. Install the updater package
      # rpm -Uvh supportutils-plugin-updater-*.noarch.rpm
    4. Run updateSupportutils as root
      # updateSupportutils

    Option B (Manual)

    1. Download the supportutils and any applicable supportutils plugin packages for your server.
    2. Login as root
    3. Install the supportutils-X.XX-XX.XX.noarch.rpm
      # rpm -Uvh supportutils-X.XX-XX.XX.noarch.rpm
    4. Install the supportutils-plugin-*-X.X-X.X.norarch.rpm packages you want
      # rpm -Uvh supportutils-plugin-*-X.X-X.X.norarch.rpm

    Using Supportconfig

    To upload a supportconfig to Novell, run supportconfig -ur $srnum; where $srnum is your 11 digit service request number. You can also just run supportconfig for local use. By default, supportconfig saves its information in /var/log/nts_hostname_date_time.tbz.

    Consider using the Novell Support Advisor to perform an initial analysis of your servers. It will generate an HTML report that links you to Technical Information Documents that directly relate to any server issues identified.

    Reporting Bugs

    Updates to Supportconfig Version 2.25-320:

    • Fixed HA error when cibadmin -Q doesn't connect
    • Fixed ldapsearch search on non-default port
    • Added systool base output to sysfs.txt
    • Added getappcore tool to gather application core files
    • Added analyzevmcore tool for kernel core analysis
    • Supportconfig includes analyzevmcore files in crash.txt
    • /etc/services included in network.txt

    Updates to Supportconfig Version 2.25-314:

    • Changed to systool for sysfs.txt
    • Added local binary list to rpm.txt
    • Added nlvm to novell-nss.txt for OES11
    • Updated copyright years
    • Added curl check for update registrations to update.txt
    • Fixed conf file execution in plugins directory
    • Added a supportconfig summary in summary.xml
    • Added /etc/init.d/halt.local to boot.txt
    • Added OPTION_UFILES for fs-files-additional.txt. [see supportconfig.conf(5)]
    • Fixed fslist_info order
    • Added kdump rpm check for sles11sp1
    • Added plugin-icommand to scplugin.rc for internal bash commands
    AttachmentSize
    supportutils-plugin-updater-1.0-19.1.noarch.rpm6.99 KB
    supportutils-1.20-59.1.noarch.rpm107.48 KB
  • Deploying Linux images can be fun!

    Johannes Renner, one of the developers in our SUSE Manager team, recently posted a very useful blog post about using SUSE Studio to create Linux images. The latest update for SUSE Manager makes this a lot simpler.

    He wrote:

    You already know that it’s possible to use SUSE Studio for creating Linux images that will automatically register with SUSE Manager once deployed to a virtual host and booted for the first time.

    From now on you can make use of this feature in a much more convenient way. The final piece of the integration between the two SUSE products is now included with the latest update for SUSE Manager.

    Starting up a new virtual system using SUSE Manager can now be simplified to the following steps:

    1. Choose the image from a list.
    2. Specify deployment parameters.
    3. Go for it.

    For the details, read this post.

  • ATT Live - Last Call

    As the event owner for ATT Live, I want to reach out and extend one last invite to this year's ATT Live conference in Las Vegas Nevada - May 15th-18th. For as long as I can remember, this has been a December conference, with an occasional repeat in the early spring based on demand. However, this year... the sunshine and warm weather of May are awaiting us in Vegas, and it could not be more welcomed!

    If you have not attended ATT Live in the past 10 years, I encourage you to check it out. You can link to the live landing page at www.novell.com/attlive. Over the years, we have made this the premier technical conference and each year we listen to our attendee's feedback making each year an improvement on the previous. This year is no exception!

    I wanted to share some highlights of this year's conference for your consideration, and if you are looking for that last attempt to get approval these things might just help.

    • Additional hands-on sessions - We have extended our tracks from 10 to 12, offering a good mix of sessions across the three Business Units. You will find 6 tracks focused on Novell ZENworks, Open Enterprise Server and GroupWise. Three tracks on NetIQ, both legacy Novell Identity and Security products and legacy NetIQ products, giving you a great opportunity to explore some new products in this space, and last, but not least, three full tracks on Suse Linux. Check out the full schedule here - http://www.novell.com/training/attlive/sessions.html
    • We have invited more product experts - In order to extend our tracks, we have invited more services employees to help deliver these sessions, adding their product knowledge and real world experience to the sessions. Product managers will also be coming to explore product roadmaps and take your feedback back to the office.
    • Certification and Practicum - Whether you are seeking certifications to validate your knowledge, seek a career advancement or just test your knowledge, certification has been included in the price of the event. We ran out of seats last year, so we opened up more sessions this year to make sure all those wanting a chance to test, have the chance. The Linux practicum will also be available in limited slots to help you get that professional Linux certification. Of course we would want you to pass, but because there is no additional charge, no one has to know if you fail.... nothing is harder than submitting a failed exam on your expense report.
    • More food, more afternoon sleeping - The M resort is known for its excellent food, buffets, and restaurants, so we are taking what worked well for us last year and have extended our buffet vouchers for lunch, giving you your choice and quantity of food, not ours. If you have any complaints on the food, you can only blame yourself for filling up your plate with the wrong things.
    • First ever Alumni event, a thanks to those who always support us - If you are an ATT Live Alumni we want to welcome you to our first Alumni event on Tuesday night. We are excited to have the M Resort open up the Winery for our use. Make sure if you are registered that you plan to join us on Tuesday night. Check out the venue here - http://www.themresort.com/dining/hostilegrape.html
    • Low travel costs. Vegas always offers the most affordable travel costs of anywhere I know. Seems you get more for your money when you keep it in your pocket and off the tables. However, I thank those that put the money down, seems to keep the expenses for the rest of us to a minimum (as if... I keep my money in my wallet). We have worked hard to keep the costs of the hotel down, with a low rate, and travel to and from the airport included.

    There are plenty of reasons for coming, and we look forward to "filling" the hotel during the week. We will have one of the highest attendances yet, and look forward to seeing you there. If you have considered attending, don't wait, it will be well worth your time and investment.

    If you have any questions or comments, you can reach my team at training@novell.com. We will be watching the inbox for your interest and will do what we can to get you there, and home happy that you came.

    Thanks -
    Jeff McMurdie

  • ATT Live 2012 Session Spotlight--Dr L's CLP 11 Pain Points Sessions

    (Note: To see a list of all the sessions planned for ATT Live 2012, go to http://bit.ly/Asgjo4.)

    At ATT Live 2012, Dr Bjoern Lotz, the designer and creator of the CLP 11 exam scenarios and evaluation scripts, will be presenting 3 sessions on the various common issues and mistakes that most often make the difference between passing and failing the SUSE Certified Linux Professional (CLP) 11 Practicum Exam. These sessions are:

    • Dr. L's Treatment for the CLP Pain Points #1: Scripting in the CLP
    • Dr. L's Treatment for the CLP Pain Points #2: NFSv4 and Syslog-ng
    • Dr. L's Treatment for the CLP Pain Points #3: Apache and Samba

    These sessions will be especially helpful for SLES 11 server administrators who want to achieve the SUSE CLP 11 certification. And ATT Live 2012 is a prime opportunity to get this certification because the CLP 11 practicum exam will be offered for free on days 3 and 4 of the event.

    I asked Bjoern to provide a bit of useful information from each session that would give you an idea of what to expect if you're interested in taking advantage of this opportunity to prepare for and take the CLP 11 exam. The following information is just a taste of what you'll learn in these sessions. You'll really need to come to ATT Live if you want the full learning experience--demonstrations, hands-on labs, interaction with the instructor, etc.

    Scripting in the CLP

    One of the common issues that comes up when performing scripting tasks in the CLP exam is that the script does not execute without errors. Among the steps you can take to make sure the script executes properly is to use the following script troubleshooting techniques:

    If you do not immediately see why a script is returning errors, you can

    • Add set -x at the top of your script - when executing the script you see additional information that can help you find the error
    • Put echo in front of commands – that way they are not executed but displayed in the output
    • Put read into your script to pause it – hit enter to continue it
    • If you don't want to run the whole script, put exit at the point where you want it to end
    • Don't forget to remove (or change into a comment with #) the above when you are done

    NFSv4 and Syslog-ng

    The common mistakes made when performing Syslog-ng tasks in the CLP exam arise from not knowing how to create filters or modify existing ones. Filtering rules that will help you in performing these tasks successfully include the several criteria that can be used for filtering:

    • Facility:
      filter f_news { facility(news); };
    • Priority
      filter f_alert { level(alert); };
    • Program (regular expression)
      filter f_dhcpd { program(“dhcpd”); };
    • String (regular expression)
      filter f_firewall { match(“IN=”): };
    • Hostname (regular expression)
      filter f_gateway { host(gateway); };
    • Elements can be combined:
      filter f_errcrit { level(err, crit); };
      filter f_mailnews { facility(mail, news); };
      filter f_iptables { match(“IN=”) and match(“OUT=”) ; };

    Apache and Samba

    A common mistake seen in the exam related to the CLP 11 Practicum Apache tasks is there are missing elements in the virtual host configuration. Some tips to keep in mind to perform these tasks successfully are:

    • The configuration is distributed across several files in /etc/apache2/, including
      • httpd.conf
      • default-server.conf
      • vhost.d
      • listen.conf
      • error.conf
      • Some configuration options are contained in /etc/sysconfig/apache2, which are used to create configuration files in /etc/apache2/sysconfig.d/
    • Virtual hosts are used to provide the Web pages of several domains on one IP address
    • To create a virtual host, you need to create a configuration file in the /etc/apache2/vhsots.d/ directory
    • The file name has to end in .conf
    • The /etc/apache2/vhosts.d/vhost.template file lists the needed parameters with comments explaining their use. You can copy that file and edit it for your virtual host

    Register today for the event and for Dr L's CLP 11 Pain Point sessions before they fill up at: www.novell.com/attlive!

    ATT Live 2012
    May 15-18, 2012
    Henderson (Las Vegas), NV
    4 days of instructor-led, hands-on advanced technical training for only $1,750

    Please follow Novell, SUSE, and NetIQ Training on:
    http://twitter.com/novell_training
    http://www.facebook.com/NovellTraining