Tuesday, 24 June 2014

How to mount iso on LInux?

To mount iso image on your file system you should do next thing

server#mount -t iso9660 iso_file /mount_point -o loop

You will have only info that this is read-only file system!

In case that you do this a lot, this mounting of iso you can write simple script that will save you few seconds of your time! You may think that few seconds is nothing but i read once

"If you do some job more then twice, write a script for it"

My script look like this

server#cat mount_iso
#!/bin/bash
ISO="$1"
echo $ISO
mount -t iso9660 $ISO /mnt/ -o loop


You should put this is your /usr/bin or /bin folder so that you can execute script from anywhere in the system!

How it works?

# mount_iso rhel-server-5.9-x86_64-dvd.iso
rhel-server-5.9-x86_64-dvd.iso
[root@plavi2 iso]# ls /mnt/
Cluster            README-te.html            RELEASE-NOTES-U9-en
.

.
.

Monday, 23 June 2014

How to test if your zabbix server receive data from zabbix client EXPLAINED!

Ok, so you have installed zabbix agent on your server. Process zabbix client is up and running but does zabbix server start to receive data from it?

Simplest way to this is to connect to your zabbix server and iniate zabbix_get command! With this command can get to see data from zabbix client!

How to do this?

zabbix_server#zabbix_get -s IP_ZABBIX_CLIENT -k ZABBIX_ITEM

Zabbix item can be any item that is using on zabbix client!

If you client is on IP address 192.168.0.2 and then command will look like this!

# zabbix_get -s 192.168.0.2 -k agent.version
2.2.1


In case that you see something like this, then this means that you have communication between zabbix server and zabbix client!

In case that you have this error

zabbix_server#zabbix_get -s 192.168.0.2 -k agent.version
zabbix_get [30914]: Timeout while executing operation


check IP address of your zabbix client, if you can even connect to that server or if that server is alive!

If your error is this

zabbix_server# zabbix_get -s 192.168.0.2 -k agent.version
zabbix_get [31561]: Get value error: cannot connect to [[192.168.0.2 ]:10050]: [111] Connection refused

server 192.168.0.2 is alive but zabbix agent is not installed, not running or firewall is blocking it!