Koozali.org: home of the SME Server

Zabbix 1.0 How-to

kangkc

Zabbix 1.0 How-to
« on: June 24, 2004, 10:48:07 AM »
After 2 days of testing and trying. I managed to install Zabbix 1.0 onto SME Server 6.0.1-01. Unfortunately I am still very new to SME Server and will not be able to put everything into a RPM.
These are the steps invole:

1. Find a development machine as you will need to install GCC compiler to compile the Zabbix module.

2. Download the following rpm from www.rpmfind.net:
   cpp-2.96-113.i386.rpm
   kernel-headers-2.4.9-34.i386.rpm
   glibc-devel-2.2.5-44.i386.rpm
   gcc-2.96-113.i386.rpm

   for ucd-snmp support, you will need:
   ucd-snmp-devel-4.2.5-8.73.1.i386.rpm
   ucd-snmp-4.2.5-8.73.1.i386.rpm
   openssl-devel-0.9.6b-35.7.i386.rpm

   to use icmpping for Zabbix, you will need:
   fping-2.4b2-2.i386.rpm

3. Install the above rpms in the above order

4. Upgrade the php to 4. I am using the following scripts to upgrade the php:
http://mirror.contribs.org/smeserver/contribs/dmusty/SME6.0/scripts/php4.3.6-upgrade.sh

5. I assume from you here you know how to get Zabbix into an ibay. To compile the various daemons for Zabbix. read the Zabbix manual for detail regarding this. For my case I perform the following:
    ./configure --with-mysql -with-ucd-snmp
then do a
    make

6. Copy the required daemon modules into /usr/local/bin

7. Copy the various conf files from zabbix-1.0/misc/conf to /etc/zabbix

8. Copy the php scripts from /zabbix-1.0/frontends/php/* to the designated ibays html directory

9. Create the mysql database for zabbix. Change the various conf files in /etc/zabbix to reflect the mysql setting. Change the db.inc.php in the include directory of the php frontend scripts as well.  

10. Start the daemons according to the Zabbix manual. For me I started ./zabbix_suckerd and ./zabbix_trapperd

11. Now you can access the Zabbix Web front ends to continue with you configuration.

12. For clean up, I would suggest removing the various compiler and devel rpm from the server.

Good luck.

CKConsulting

Zabbix 1.0 How-to
« Reply #1 on: November 30, 2004, 06:20:28 AM »
How do you like Zabbix after using it for a while?
Any words of wisdom?

Rick

Offline ajkeane

  • *****
  • 187
  • +0/-0
    • http://keane.co.nz
Zabbix 1.0 How-to
« Reply #2 on: February 25, 2005, 10:40:10 AM »
kangkc

I have compiled zabbix and attempted to follow the instructions along with your how to but have been unable to get zabbix running.

Whenever i try to start the service it comes back as failed.

Do you have any ideas or could you expand on how you got this running so that I could have a better idea of where I am going wrong.

Thanks

Tony
...

kangkc

Zabbix 1.0 How-to
« Reply #3 on: February 26, 2005, 02:52:13 AM »
Hi,

This was done about a year ago and I have not updated the Zabbix on the machine since then. As far as the machine is concern, it's running till now.

Unfortunately I don't have the time/machine for the next 1 month to test the latest Zabbix distribution.

What I can suggest now is make sure the building from source is error free. And try to follow the Zabbix document to see if you missed out any configuration step, MSSQL password etc as I didn't document that in detail in the how-to. The Zabbix domentation is quite detail in this area.

Let me know if you have any error messages.

Offline ajkeane

  • *****
  • 187
  • +0/-0
    • http://keane.co.nz
Zabbix 1.0 How-to
« Reply #4 on: February 26, 2005, 09:13:26 AM »
kangkc

Thanks for your reply.

I have gone through the manual and checked the sites forums but have been unable to get the zabbix_suckerd or zabbix_trapperd to start whenever I try I get the following error. The web interface and everything is working I just can't start the service.

[root@test-server bin]# ./zabbix_trapperd start
Starting zabbix_trapperd: Usage: /usr/local/bin/zabbix_trapperd {start|stop|restart|condrestart}
                                                           [ FAILED ]

If you have the time and could tel me what files you moved to the usr/local/bin directory and the etc/zabbix directory I would really appreciate it.

I am positive that I am missing something really basic but for the life i=of me cannot see what it is.

Thanks again

Tony
...

Offline ajkeane

  • *****
  • 187
  • +0/-0
    • http://keane.co.nz
Zabbix 1.0 How-to
« Reply #5 on: February 27, 2005, 05:16:37 AM »
Just thought I would let you know that I have now succeeded in getting the configure and make to work. Turned out to be a mysql error that is known but it took time to find the fix.

Once I have everything configured and know that it works and have tried it on a test server I will look at putting something together for the community.

Thanks for the help.

Tony
...

Offline ajkeane

  • *****
  • 187
  • +0/-0
    • http://keane.co.nz
Zabbix 1.0 How-to
« Reply #6 on: February 28, 2005, 05:24:13 AM »
Is anybody interested in setting this up on there test server?

If so let me know and I will supply you with the info to install it.

Tony
...

Wietse

Zabbix 1.0 How-to
« Reply #7 on: February 28, 2005, 11:08:51 AM »
yes, I am... trying to get it to work myself...

Offline ajkeane

  • *****
  • 187
  • +0/-0
    • http://keane.co.nz
Zabbix 1.0 How-to
« Reply #8 on: March 01, 2005, 08:20:27 AM »
O.K.

I have tarred up the compiled version of Zabbix and done up a wee install doc for you to follow.

It is available at http://keane.co.nz in the downloads area.

I have tested on SME Server 6.01 and have not had any issues.

Please let me know how you get on.

Tony
...

drywalldude

This looks great
« Reply #9 on: March 02, 2005, 01:34:48 PM »
Well I made it to the front end !! :lol: . Never new phpmyadmin had such a cool impoting feature right out of my windows box, thanks for that educational experience. I don't have time now to finish the configuration but so far all the questions I was going to post have been answered in the zabbix doc (espicially regarding mysql) thanks for the great post, I am a addicted to graphing and statistics having been a cacti user http://ericswww.com/cacti/graph_view.php?action=tree&tree_id=1&leaf_id=7&select_first=true
I think this will be a really great addition to contribs capabillities, keep up the great work  :hammer:

Offline ajkeane

  • *****
  • 187
  • +0/-0
    • http://keane.co.nz
Zabbix 1.0 How-to
« Reply #10 on: March 03, 2005, 07:53:55 AM »
Good to know you have made it that far. I would be keen to know where you had trouble/difficulty during the install.

This is merely so that I can tidy up the how to.

Keep us informed on your progress as I am still struggling to get anything out of the system. I have not been able to get the agents to work as yet. My fault I believe. Just don't understand the printed word at times. I will keep at it and see where I end up.

Tony
...

drywalldude

Still working at it slow but sure!!
« Reply #11 on: March 03, 2005, 11:44:09 AM »
Ok got past the log in, the problem that I had here that probably should be put into the howto is explained on page 22 of the manual and it involves editing the /frontends/php/include/db.inc and removing the postgresql entry leaving the mysql, removing the "root" entry and supplying "zabbix" as user (DO NOT RUN AS ROOT). At this point I have got to the configuration page and it looks really cool  8-)

My suggestions are as follows :
1:This post probably needs to be moved to the Experienced user forum, as there will need to be some template writing.
2:More people at this post need to check out
http://www.zabbix.com/screenshots.php and see what it is that is being worked on here, this makes all the other network solutions look sad.

ajkeane, I will let you know of progress as my time is limited during the week(about 1hr per day) but by the end of this weekend I would hope to be making graphs.
Thanks again for the great post you have started here I'm sure the community will follow up on this one :-D

Skydiver

This looks great
« Reply #12 on: March 04, 2005, 04:53:46 AM »
Please can someone follow up on this addition to SME its way above my head..But i feel this is something i would love to have working on my SME server.

Great work so far and thanks for sharing.

kangkc

Zabbix 1.0 How-to
« Reply #13 on: March 05, 2005, 11:21:56 AM »
Glad to know that the problem has been resolved. I didn't put much of the detail from Zabbix manual into the how-to. Could have done so...my sincere apology.

Just to share with everyone how Zabbix been used in our environment. I'm using Zabbix more for the alert purposes and whenever a server is down, I'll receive a SMS text message to alert me.
I'm also monitoring the temperature of the server room, likewise when the temperature hit a certain threshold, SMS text message will be sent.

I've been looking for a SMS gateway on the SME Server platform but no luck so far. Currently using a M$ platform SMS gateway whcih I would like to move that into a Linux platform (or more specfically SME based). Will try to branch out a discussion on SMS gateway.

drywalldude

local machine
« Reply #14 on: March 05, 2005, 04:44:41 PM »
My firewall will probably prevent my webserver from access to my workstation, so what do I need to run to monitor the localhost?? a quick small howto would be greatly appreciated, and I don't think I fully understand what a SMS gateway is, I know it has something to do with wireless .

kangkc

Zabbix 1.0 How-to
« Reply #15 on: March 06, 2005, 05:01:49 AM »
Drywalldude,
What I'm using is using the PING method in Zabbix to monitor the availability of the LAN hosts.

Try to do a ping from the Zabbix machine to you localhost, chances is if you are able to ping, you should be able to monitor.

Alternatively is to use SNMP which I have not gone into the detail as it's another different world with SNMP

Zabbix website has a very active and responsive community forum which I suggest to post your question on Zabbix site.  

As for the SMS gateway, it's basically text service gateway able to text message to your cellular phone (or known as mobile phone) which you will need a GSM modem connected to the SMS gateway. FYI.

Offline Drifting

  • *****
  • 431
  • +0/-0
Error connecting to database
« Reply #16 on: March 19, 2005, 03:56:26 PM »
Error connecting to database [Access denied for user: 'www@localhost' (Using password: NO)]

Using Tony Keanes Howto for Zabbix.

Any ideas? I have been in touch with Tony and he suggested a few things to try, one of which was the username & db name, which were set the same as his example he sent in the file zabbix_trapperd.conf.

I have reset the Mysql username as per Tony's instructions, still the same.

Not wanting to keep emailing and harrasing him, does any one have an idea why I get the above?
Infamy, Infamy, they all have it in for me!

dswillia

Zabbix 1.0 How-to
« Reply #17 on: March 19, 2005, 04:51:55 PM »
You need to edit the db.inc.php in the includes folder.  Set your dbname, user, and pasword accordingly.

Regards

Offline Drifting

  • *****
  • 431
  • +0/-0
Zabbix 1.0 How-to
« Reply #18 on: March 19, 2005, 07:58:24 PM »
Quote from: "dswillia"
You need to edit the db.inc.php in the includes folder.  Set your dbname, user, and pasword accordingly.

Regards


Whoo hooo that was it...

Thanks
Infamy, Infamy, they all have it in for me!

drywalldude

Anyone graphing "local host" I wold like to see??
« Reply #19 on: March 20, 2005, 02:22:15 AM »
My original idea was to have this graph the server itself "localhost" (even though I realize the smnp potential) I would like to know how this is accomplished ? as I have been a cati nut, and this looks even better!!! 8-)

kangkc

Zabbix 1.0 How-to
« Reply #20 on: March 20, 2005, 05:29:29 AM »
If it's just for localhost, you will have to decide what to monitor. HTTP port, SMTP etc.

For localhost actually I use sysmon as it doesn't make sense for availability (for my case) monitoring if the localhost is down, eveything on the localhost will be down including Zabbix.

chapan

Zabbix 1.0 How-to
« Reply #21 on: April 22, 2005, 02:37:06 AM »
Hi All,


I recently installed zabbix but it doesnot work for me.
I am able to browse the pages as well as able to start the services but data is collected I am monitoring the localhost where the zabbix is loaded as a test. I have started suckerd trapperd and agentd.
When I check in the webpage under the STATUS OF ZABBIX  

it shows no for both Is zabbix_suckerd running ? and
Is zabbix_trapperd running ?

can someone guide me on this

Thanks

Chapan

kangkc

Zabbix 1.0 How-to
« Reply #22 on: April 22, 2005, 02:58:51 AM »
You probably want to do some fundamental check on the daemons.

Log in to SME as root and do a 'ps' command in shell to check is the Zabbix related daemons started? Most probbaly it's not juding from what you mentioned. Check the config files that relating to the daemon to see any possible config problem etc.

chapan

Zabbix 1.0 How-to
« Reply #23 on: April 22, 2005, 06:59:01 PM »
Thanks For ur reply. ... I have tried that and it shows as zabbix_suckerd and zabbix_agentd running.
If I use lsof -i cammand and check it shows zabbix_agent and zabbix_trap.
I have checked the configuration files and I have configured the required details.

And to correct my mentioning in the earlier post there no new data collected.

Thanks

Chapan

kangkc

Zabbix 1.0 How-to
« Reply #24 on: April 23, 2005, 03:45:06 AM »
You mentioned that when you open the status page on Zabbix, you see the suckerd and trapperd is not running. Correct me if I'm wrong.

Can you double check the MySQL parameters to make sure the DB, id, password are correct.

The other things you can do is to change the debug option in the config files and look at the logfile parameters to see you notice any error captured in the log file.

I guess the log file will be the best bet to see what really happened.

Let me know if you need further assistance. Have not touched the Zabbix for almost a year since I have it running. That's the beauty of SME........

chapan

Zabbix 1.0 How-to
« Reply #25 on: April 26, 2005, 09:17:13 PM »
yes when I check on the [STATUS OF ZABBIX] tab Is zabbix_suckerd running ? and Is zabbix_trapperd running ? shows the vaule as "NO".

I have checked the MySQL parameters and all are correct if not it will give error when suckerd or traperd start.

As u suggeted I enabled the debug mode in all the cobf files except for sukkered others are not giving any new info except that the service started.

In sukkered log I find lot of info But I am not able to make sense out of it.

I will paste a sample of it here Hope you would be able to identifiy the problem.

009714:20050426:114603 Executing query:select a.alertid,a.mediatypeid,a.sendto,a.subject,a.message,a.status,a.retries,mt.mediatypeid,mt.type,mt.description,mt.smtp_server,mt.smtp_helo,mt.smtp_email,mt.exec_path from alerts a,media_type mt where a.status=0 and a.retries<3 and a.mediatypeid=mt.mediatypeid order by a.clock
009714:20050426:114603 In DBnum_rows
009716:20050426:114603 Executing query:select distinct f.itemid,f.functionid,f.parameter from functions f, items i,hosts h where h.hostid=i.hostid and (h.status=0 or (h.status=2 and h.disable_until<1114541163)) and i.itemid=f.itemid and f.function='nodata' and i.lastclock+f.parameter<=1114541163 and i.status=0 and i.type=2 and f.lastvalue<>1
009716:20050426:114603 In DBnum_rows
009714:20050426:114633 Executing query:select a.alertid,a.mediatypeid,a.sendto,a.subject,a.message,a.status,a.retries,mt.mediatypeid,mt.type,mt.description,mt.smtp_server,mt.smtp_helo,mt.smtp_email,mt.exec_path from alerts a,media_type mt where a.status=0 and a.retries<3 and a.mediatypeid=mt.mediatypeid order by a.clock
009714:20050426:114633 In DBnum_rows
009716:20050426:114633 Executing query:select distinct f.itemid,f.functionid,f.parameter from functions f, items i,hosts h where h.hostid=i.hostid and (h.status=0 or (h.status=2 and h.disable_until<1114541193)) and i.itemid=f.itemid and f.function='nodata' and i.lastclock+f.parameter<=1114541193 and i.status=0 and i.type=2 and f.lastvalue<>1
009716:20050426:114633 In DBnum_rows
009723:20050426:114652 Executing query:select i.itemid,i.key_,h.host,h.port,i.delay,i.description,i.nextcheck,i.type,i.snmp_community,i.snmp_oid,h.useip,h.ip,i.history,i.lastvalue,i.prevvalue,i.hostid,h.status,i.value_type,h.network_errors,i.snmp_port,i.delta,i.prevorgvalue,i.lastclock from items i,hosts h where i.nextcheck<=1114541212 and i.status=0 and i.type not in (2) and (h.status=0 or (h.status=2 and h.disable_until<=1114541212)) and h.hostid=i.hostid and i.itemid%1=0 and i.key_<>'status' and i.key_<>'icmpping' and i.key_<>'icmppingsec' order by i.nextcheck
009723:20050426:114652 In DBnum_rows
009723:20050426:114652 Spent 0 seconds while updating values
009723:20050426:114652 Executing query:select count(*),min(nextcheck) from items i,hosts h where (h.status=0 or (h.status=2 and h.disable_until<1114541212)) and h.hostid=i.hostid and i.status=0 and i.type not in (2) and i.itemid%1=0 and i.key_<>'status' and i.key_<>'icmpping' and i.key_<>'icmppingsec'
009723:20050426:114652 In DBnum_rows
009723:20050426:114652 Result of DBnum_rows [1]
009723:20050426:114652 Nextcheck:-1 Time:1114541212
009723:20050426:114652 Sleeping for 60 seconds
009718:20050426:114652 In create_host_file()
009718:20050426:114652 Executing query:select distinct h.ip from hosts h,items i where i.hostid=h.hostid and (h.status=0 or (h.status=2 and h.disable_until<=1114541212)) and (i.key_='icmpping' or i.key_='icmppingsec') and i.type=3 and i.status=0 and h.useip=1
009718:20050426:114652 In DBnum_rows
009718:20050426:114652 Executing query:select distinct h.host from hosts h,items i where i.hostid=h.hostid and (h.status=0 or (h.status=2 and h.disable_until<=1114541212)) and (i.key_='icmpping' or i.key_='icmppingsec') and i.type=3 and i.status=0 and h.useip=0
009718:20050426:114652 In DBnum_rows

chapan

Zabbix 1.0 How-to
« Reply #26 on: April 27, 2005, 02:39:52 AM »
thanks for taking out time to help me.

The problem got solved as I happend to restart the server and the status shows "yes".

Yet to check on other configuration.