nothing is impossible!!!!

nothing is impossible!!!!

Thursday, July 30, 2009

**FATAL_ERROR** No password for admin user - please re-run ntop in non-daemon mode fir st

When you install ntop, daemon does not start automatically. It returns above error when you try to start it.

You need to set password to start ntop in daemon mode.
"ntop -A" or ntop --set-passwd

It asks for password, set it.
Then start the service.
/etc/init.d/ntop start

You are now ready to view your network statitics :).

checking for intltool >= 0.35.0... ./configure: line 16914: intltool-update: command not found

Error:
checking for intltool >= 0.35.0... ./configure: line 16914: intltool-update: command not found
configure: error: Your intltool is too old. You need intltool 0.35.0 or later.

Solution:
1. Install package, intltool-0.35.0-2.i386
2. It will fail for following dependency if XML Parser not installed.
error: Failed dependencies:
perl-XML-Parser is needed by intltool-0.35.0-2.i386
3. Also Download and install perl-XML-Parser package

Error! You need to have libevent 1.4.X or better.

You need to install libevent-devel package. Please find the respective package for your OS and install it. Also check whether you have already install libevent.

Wednesday, July 29, 2009

How to monitor bandwidht using MRTG and Nagios

Assuming that you have enough knowledge of Unix system and Nagios monitoring. If you dont know how to configure nagios please follow this link

Prerequisite:
- Make sure Nagios is running properly. Check http://localhost/nagios
- Also make sure that you have installed nagios_plugins.
- Iptables and Selinux must be disabled.

Install check_snmp plugin:
- Make sure you have all following packages install for successful installation of snmp plugin.
net-snmp, net-snmp-devel, net-snmp-libs, net-snmp-utils, beecrypt-devel,
elfutils-devel, elfutils-devel-static, lm_sensors

- To install check_snmp I download the plugin from this location. check_snmp

1. Unzip the downloaded file
bunzip check_snmp-1.1.tar.bz2

2. Untar it.
tar xvf check_snmp-1.1.tar

3. Configure and install it.
./configure
make
make install

4. Once it is install successfully you can find check_snmp at /usr/local/bin location.

5. Create a soft link for check_snmp.
ln -s /usr/local/bin/check_snmp /usr/local/nagios/libexec/check_snmp


Install MRTG:
To monitor bandwidth usages of router/switch you must have mrtg installed on system. Before installation please make sure you have install gd, libpng, zlib packages.

1. Download MRTG.

2. Once all libraries installed required for MRTG you are all set to compile and configure MRTG.
gunzip -c mrtg-2.16.2.tar.gz | tar xvf -
cd mrtg-2.16.2

3. ./configure --prefix=/usr/local/mrtg-2
make
make install

4. Create /var/www/html/mrtg file to store mrtg html files.
mkdir /var/www/html/mrtg

5. Now you need not to create mrtg configuration file. Use cfgmaker.
cfgmaker --global 'WorkDir: /var/www/html/mrtg' --global 'Options[_]: bits,growright' --output /etc/httpd/conf/mrtg.cfg public@172.17.42.22
( I choose default apache web location for installation of mrtg html files and apache conf directory to store mrtg.cfg.)

6. Go to respective location and make sure that above command has created respective files.
cd /var/www/html/mrtg;
ls -al /etc/httpd/conf/mrtg.cfg

7. Run this command to update mrtg log file.
env LANG=C /usr/local/mrtg-2/bin/mrtg /home/mrtg/cfg/mrtg.cfg

8. create a script to update the mrtg log file which will fetch data regularly and display in graph as well as on nagios.
vi /usr/local/mrtg-2/bin/monitor_mrtg.sh

9. Put following lines in it and save.
#!/bin/sh
env LANG=C /usr/local/mrtg-2/bin/mrtg /home/mrtg/cfg/mrtg.cfg
(When you run it first time it returns you few errors/warnings. Ignore it.)

chmod 755 mrtgbw.sh ; Make script executable.

10. Set cron to run above script every 5 minute.
crontab -e

11. Modify and save,
*/5 * * * * /usr/local/mrtg-2/bin/monitor_mrtg.sh

12. Restart cron service.
/etc/init.d/crond restart

13. Confirm that it is been configured.
http://localhost/mrtg/{name of html file}

Actually when you run mrtg command it searches for respective router community collects all data from router. Accordingly it creates log file. Like in my case it has found port 2 running on router and hence created file 172.17.42.22_2.log, 172.17.42.22_2.html. So I can access my graph through this link,
http://localhost/mrtg/172.17.42.22_2.html

Procedure to monitor Bandwidth Usages in Nagios:
1. Default installation directory of nagios is /usr/local/nagios/.

2. Open switch.cfg file
vi /usr/local/nagios/etc/objects/switch.cfg

3. Make changes according to your router specifications. Like,
define host{
use generic-switch
host_name Router_1
alias Router 1
address 172.17.42.22
hostgroups switches
}
4. You can also set PING, Uptime, Ports Link Status etc.
define service{
use generic-service ; Inherit values from a template
host_name Router_1 ; The name of the host the service is associated with
service_description PING ; The service description
check_command check_ping!200.0,20%!600.0,60% ; The command used to monitor the service
normal_check_interval 5 ; Check the service every 5 minutes under normal conditions
retry_check_interval 1 ; Re-check the service every minute until its final/hard state is determined
}

define service{
use generic-service ; Inherit values from a template
host_name Router_1
service_description Uptime
check_command check_snmp!-C public -o sysUpTime.0 -H 172.17.42.22
}

define service{
use generic-service ; Inherit values from a template
host_name Router_1
service_description Port 2 Link Status
check_command check_snmp!-C public -o ifOperStatus.2 -r 1 -H 172.17.42.22
}

define service{
use generic-service ; Inherit values from a template
host_name Router_1
service_description Port 2 Bandwidth Usage
check_command check_local_mrtgtraf!/var/www/html/mrtg/172.17.42.22_2.log!AVG!1000000,1000000!5000000,5000000
!10
}

5. Verify the configuration of nagios
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

6. Restart nagios service.
/etc/init.d/nagios restart

Tuesday, July 21, 2009

Solaris: Disk Management

- A disk under the Solaris OE can be divided into eight slices that are labeled Slice 0 through Slice 7.
- In reality Slice 2 represents the entire disk because "/" is the first(0) slice and swap is second(1).

Dist Slice Naming Convention, Controller number, Target number, Disk number, Slice number.
- Controller number, which control communications between system and disk unit.
- Target number is a unique hardware address of disk, tape, CDROM etc.
- Disk number is a logical unit number.
- Slice number is partition number on disk.

Solaris: Key points in File System

Inode
In general inode contains two parts. First, inodes contains information about file, including owners, permissions, size etc. Second inode contains pointers to data blocks associated with files.

Different file types
Regular files
Directories
Device files contains block device and character device.
Symbolic links
Socket files

- Data block associated with directory contains lists of all files and associated inodes.
- Symbolic links can point to regular files, directories, other symbolic links and device files.
- A data block of symbolic link contains the path of original file.
- A long listing of a device file shows two numbers, separated by a comma where major number denotes specific device driver required to access the device and minor device denotes the specific unit of the device driver control.

Wednesday, July 15, 2009

Red Hat : Global File System

- native file system.
- Interfaces directly with Linux kernel file system interface (VFS Player).
- Can be implemented on Standalone System.
- Can be a part of cluster configuration.
- GFS can be created on LVM logical volume.
- GFS is based on 64 bit architecture, can accommodate 8 EB file system.
- Red Hat GFS nodes can be configured and managed with Red Hat Cluster Suite configuration and management tools.
- LVM logical volumes in a Red Hat Cluster Suite are managed by CLVM, which is cluster wide implementation of LVM (clvmd daemon).
- daemon allow all nodes in cluster to share the volume.

Tuesday, July 7, 2009

OTRS: How to set the Generic Agent?

Taken from, lists.otrs.org.

So you need to create as many jobs as you have agents.
The idea behind GenericAgent is very simple: search for tickets using the
values in sections shaded grey and set new values in tickets in sections
shaded black. You should have all your ticket types, queues, agents,
customers defined before you start making a GenericAgent job.

For example, we are building a job to assign Hardware problems to Mark
Twain.

In Admin, go to Generic Agent. Type in the job name Hardware_to_Twain and
click Add. A new job form appears. Study it a little. There are sections
with title shaded gray. The values you put into these sections' fields are
used to select the tickets for processing by the job. You select Agent/Owner
= root at localhost. You select ticket state = new. You select Ticket lock =
unlock, you select ticket type = Hardware problem. How do you plan to deal
with email tickets btw? They will not get tycket type set correctly.

Now we move to sections with titles shaded black. That's where we program
new values for ticket fields:
You select new Agent = Mark Twain. You select the new Queue = Hardware, New
ticket lock = lock.
You may add a note to leave trace of what has been done for your customer.
(It's reflected in the history for the agents anyway).
Check Send no notifications flag .

Go back to the beginning and think of the schedule for the job. How often it
should run?

AS soon as you save the job - you're done. If there are problems with the
job - look in the System Log.

OTRS: How survey module works?

There are no steps given anywhere about how survey module works.
Here are the steps given,
1. Download and install Survey module
2. Login as OTRS Admin i.e. root@localhost by default.
3. Navigate to SysConfig setting under "Misc" section.
4. Search for Survey, then go to Core -> Survey::SendPeriod.
5. Change this value to 0, to send mail always whenever agent close the ticket.
6. Also created survey should have status as "Master". This is the setting when you create the survey.

This is where you can find more details, this post is translation from German.
http://translate.google.com/translate?hl=en&sl=de&u=http://wiki.otrs-forum.de/index.php%3Ftitle%3DSurvey&ei=3VWxSdOZCozMmQeRxJjfBQ&sa=X&oi=translate&resnum=8&ct=result&prev=/search%3Fq%3DSurvey::SendPeriod%26hl%3Den%26client%3Dsafari%26rls%3Den-us%26sa%3DG

Sunday, July 5, 2009

Ganglia Installation errors and solutions.

Error:
Checking for apr
checking for apr-1-config... no
configure: error: apr-1-config binary not found in path
make: *** No targets specified and no makefile found. Stop.

Resolution:
Install respective version of apr-devel. for me it was apr-devel-1.2.7-11.i386.rpm

Error:
Checking for confuse
checking for cfg_parse in -lconfuse... no
Trying harder including gettext
checking for cfg_parse in -lconfuse... no
Trying harder including iconv
checking for cfg_parse in -lconfuse... no
libconfuse not found

Resolution:
Install "libconfuse" and "libconfuse-devel" packages.

Error:
mod_python.c error: Python.h: No such file or directory
Resolution:
Install "python-devel" package if not installed.

- nilesh

Wednesday, July 1, 2009

Nagios: How to suppress notifications when host goes down.

There are two ways to avoid extra notifications of services when host goes down.

1. Configure ping (use check-host-alive) as the host check, when the host is unreachable, the notifications for the services will not be sent.

2. Can have service dependency configuration file like this,
define servicedependency {
hostgroup_name all_servers
service_description ping check
dependent_hostgroup_name all_servers
dependent_service_description *
execution_failure_criteria w,c
notification_failure_criteria w,u,c
}