Koozali.org: home of the SME Server

[ANNOUNCE] smeserver-zabbix

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
[ANNOUNCE] smeserver-zabbix
« on: March 23, 2009, 09:59:06 PM »
Hi everyone.
I've made a contrib for Zabbix monitoring tool.
3 different packages are available for the different components of Zabbix:
smeserver-zabbix-server (server+web frontend)
smeserver-zabbix-agent
smeserver-zabbix-proxy

It uses the latest version available (1.6.2)

You can have a look at the wiki page here: http://wiki.contribs.org/Zabbix
C'est la fin du monde !!! :lol:

Offline hanscees

  • *
  • 267
  • +0/-0
    • nl.linkedin.com/in/hanscees/
Re: [ANNOUNCE] smeserver-zabbix
« Reply #1 on: March 25, 2009, 11:17:27 PM »
Hi everyone.
I've made a contrib for Zabbix monitoring tool.

You can have a look at the wiki page here: http://wiki.contribs.org/Zabbix
Been fiddling with it.
I installed server and monitor on my sme.

I added some router-hops.
I would like to monitor if my adsl-line goes down.

I did this:
add host hop1
add host hop2

etc.
Then added template standalone to them and use only icmp ping.

Is that a standard way to go about?

Also it reports that local zabbix agent cannot be reached. How do I know it is up? I use the template_linux on 127.0.0.1

log says:

  3929:20090325:230904 zabbix_agentd started. ZABBIX 1.6.2.
  3946:20090325:230904 zabbix_agentd collector started
  3947:20090325:230904 zabbix_agentd active check started [localhost:10051]
  3947:20090325:231004 Can't open jason object
 it seems to run:

[root@mail ~]# ps waux | egrep zabbix | egrep age
zabbix    3929  0.0  0.0  5796  684 ?        SN   23:09   0:00 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
zabbix    3946  0.0  0.0  5796  712 ?        SN   23:09   0:00 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
zabbix    3947  0.0  0.0  5816  752 ?        SN   23:09   0:00 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf



greetings

Hans-Cees



« Last Edit: March 25, 2009, 11:38:20 PM by hanscees »
nl.linkedin.com/in/hanscees/

Offline Bud

  • *
  • 487
  • +0/-0
Re: [ANNOUNCE] smeserver-zabbix
« Reply #2 on: March 26, 2009, 04:56:49 PM »
VIP-ire thanks for the contrib

very interested in this

i installed and all worked ok. i changed a setting in the config to use http connection and now all i get is

" Forbidden
You don't have permission to access /zabbix/ on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. "

how do i uninstall all the zabbix components so that i can start from the beginning  :grin:





Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: [ANNOUNCE] smeserver-zabbix
« Reply #3 on: March 26, 2009, 05:07:54 PM »
Is that a standard way to go about?
Well,  there's no "standard way to do this. You can really configure it the way you want. To monitor if the connexion of my zabbix server is up, I've added one host, (I choosed google.fr, but you can use any host you want, as long it's up at least 99% of the time), I've then add simple ICMP check on this host, and a trigger which warns me if latency is too high or if avg latency is 0 on a fixed amount of time.

Also it reports that local zabbix agent cannot be reached. How do I know it is up? I use the template_linux on 127.0.0.1

I've configured the agent in the contrib to work in passive mode only. That means the server wont try to contact the agent. In order to make it work, you have to create the host the exact name of your server (hostnam.domain.tld), and change the different item to use "Agent (active)" to retrieve the informations.

VIP-ire thanks for the contrib

very interested in this

i installed and all worked ok. i changed a setting in the config to use http connection and now all i get is

" Forbidden
You don't have permission to access /zabbix/ on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. "

how do i uninstall all the zabbix components so that i can start from the beginning  :grin:

Well, that depends on what you have changed in the config. Did you edit httpd.conf directly ? Added a custom template ? change the 'WebAccess' db propertie ? You should be able to fix it by removing any custom template for zabbix you may have added, then, delete the db properties if you have changed some:
Code: [Select]
db configuration delete zabbix-server
/etc/e-smith/events/actions/initialize-default-databases
signal-event zabbix-server-update
C'est la fin du monde !!! :lol:

Offline hanscees

  • *
  • 267
  • +0/-0
    • nl.linkedin.com/in/hanscees/
Re: [ANNOUNCE] smeserver-zabbix
« Reply #4 on: March 26, 2009, 08:11:44 PM »
Well,  there's no "standard way to do this. You can really configure it the way you want. To monitor if the connexion of my zabbix server is up, I've added one host, (I choosed google.fr, but you can use any host you want, as long it's up at least 99% of the time), I've then add simple ICMP check on this host, and a trigger which warns me if latency is too high or if avg latency is 0 on a fixed amount of time.
I am sorry for being an beginner in zabbix. How do I add a simple icmp check?
In what file? Or can I do that in the gui alone?


Quote
I've configured the agent in the contrib to work in passive mode only. That means the server wont try to contact the agent. In order to make it work, you have to create the host the exact name of your server (hostnam.domain.tld), and change the different item to use "Agent (active)" to retrieve the informations.
If the agent in the contrib does not work, why configure it that way?

Anyway, after restarting the agents (is there a convenient way to do that?) it works. I just us ethe host "zabbix server", with no dns name and connecting to 127.0.0.1. I did set the agent to "active".

Sorry for all the inconveniance.

Hans-Cees
« Last Edit: March 26, 2009, 08:32:24 PM by hanscees »
nl.linkedin.com/in/hanscees/

Offline Bud

  • *
  • 487
  • +0/-0
Re: [ANNOUNCE] smeserver-zabbix
« Reply #5 on: March 27, 2009, 05:58:27 AM »
thanks VIP-ire that did it. all works fine

thanks again  :smile:

Offline Bud

  • *
  • 487
  • +0/-0
Re: [ANNOUNCE] smeserver-zabbix
« Reply #6 on: March 27, 2009, 07:09:45 AM »
oops more questions

when i go to " Monitoring : Dashboard " i see that under "Status of Zabbix" Parameter - ZABBIX server is running - "No"

how do i get the Parameter status for the Zabbix server to say "yes" meaning that the zabbix server IS Running?

also when i'm outside my lan i cannot connect to my zabiix server remotely. what script must i run to enable remote login (outside my lan)

thanks again for all the help, greatly appreciated  :smile:

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: [ANNOUNCE] smeserver-zabbix
« Reply #7 on: March 27, 2009, 09:40:32 AM »
I am sorry for being an beginner in zabbix. How do I add a simple icmp check?
In what file? Or can I do that in the gui alone?
Once you've got the server up and running, everything can be configured in the Web Interface.
You should really take a look at Zabbix documentation: http://www.zabbix.com/documentation.php

If the agent in the contrib does not work, why configure it that way?

Anyway, after restarting the agents (is there a convenient way to do that?)
The agent works, but just in active mode. The default templates provided assumes your agents run in passive mode. Now you have the choice:
- Configure your agent to work in passive mode with
Code: [Select]
db configuration setprop zabbix-agent passive enabled- Or let it in active mode only and create a new template using only active checks. (This is what I do)



when i go to " Monitoring : Dashboard " i see that under "Status of Zabbix" Parameter - ZABBIX server is running - "No"

how do i get the Parameter status for the Zabbix server to say "yes" meaning that the zabbix server IS Running?
Well that depend on the templates (or items and triggers) you've configured on the host running zabbix Server. The simple way to go is to have a item which return the number of zabbix_server_mysql process:
Code: [Select]
proc.num[zabbix_server_mysql]
Then, configure a trigger on this item like:
Code: [Select]
{Template_Linux:proc.num[zabbix_server_mysql].last(0)}<1
Take a look a the provided Template_linux, (in item and triggers). It uses passive mode, but you can copy the item and triggers you want on another template, then change it to work in active mode.

also when i'm outside my lan i cannot connect to my zabiix server remotely. what script must i run to enable remote login (outside my lan)
This is explained here: http://wiki.contribs.org/Zabbix#DB_Parameters
Code: [Select]
db configuration setprop zabbix-server WebAccess public
signal-event zabbix-server-update
C'est la fin du monde !!! :lol:

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: [ANNOUNCE] smeserver-zabbix
« Reply #8 on: March 27, 2009, 03:28:16 PM »

(modified)

There is a reference to "AllowHosts key" in the Wiki:

db configuration setprop zabbix-agent passive enabled access public AllowHosts w.x.y.z
signal-event zabbix-agent-update
signal-event remoteaccess-update

I'm confused...

I want all agents to be "active" and send their status to a central Zabbix server. Then each agent has:

db configuration setprop zabbix-agent active enabled
signal-event zabbix-agent-update


On the zabbix-server side, where do I set agents as active?

« Last Edit: March 27, 2009, 04:06:37 PM by soprom »
Sophie from Montréal

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: [ANNOUNCE] smeserver-zabbix
« Reply #9 on: March 27, 2009, 03:35:14 PM »
The AllowHosts propertie is a standard key available for any service on SME. It controls which hosts may connect to the specified TCPPort(s) or UDPPort(s) if the key access is set to public.
There's a typo in the wiki page of zabbix, it's AllowHosts (with a 's')

Also, there's no need to run the remoteaccess-update signal-event as zabbix-agent-update will expand and adjust the firewall script (same for zabbix-server-update)

For more informations: http://wiki.contribs.org/Firewall#DB_Settings
« Last Edit: March 27, 2009, 03:39:43 PM by VIP-ire »
C'est la fin du monde !!! :lol:

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: [ANNOUNCE] smeserver-zabbix
« Reply #10 on: March 27, 2009, 04:11:38 PM »

So, for an agent to accept queries from a zabbix server, this would be needed:

config setprop zabbix-agent AllowHosts 1.2.3.4
signal-event zabbix-agent-update

Now on the zabbix server side, is there something to change (I'm using your xml templates) ?
Sophie from Montréal

Offline Bud

  • *
  • 487
  • +0/-0
Re: [ANNOUNCE] smeserver-zabbix
« Reply #11 on: March 31, 2009, 07:23:31 AM »
VIP-ire sorry for the noob questions

i have a windows agent running on a windowz xp box on my lan
i can see under " monitoring, host, latest data " the values of the windowz box. yet i do not have this same windowz box on the options of " monitor -  graphs, screens or maps " what am i missing or doing wrong here.

also i want to monitor my router on the lan. how do i do this

thanks again  :smile:

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: [ANNOUNCE] smeserver-zabbix
« Reply #12 on: March 31, 2009, 09:51:37 AM »
VIP-ire sorry for the noob questions

i have a windows agent running on a windowz xp box on my lan
i can see under " monitoring, host, latest data " the values of the windowz box. yet i do not have this same windowz box on the options of " monitor -  graphs, screens or maps " what am i missing or doing wrong here.

also i want to monitor my router on the lan. how do i do this

thanks again  :smile:

Bud:

these are not SME/SME contrib issues.. you should read the zabbix documentation.

if you are experiencing issues with setup of zabbix on your SME, you are welcome, otherwise you should look in zabbix support forums/documentation :-)

thank you
Ciao
Stefano

Offline jester

  • *
  • 496
  • +1/-0
Re: [ANNOUNCE] smeserver-zabbix
« Reply #13 on: March 31, 2009, 05:55:56 PM »
When installing the zabbix-agent as an dependency the 'smeserver-remoteuseraccess' contrib is installed and 'e-smith-formmagick' is updated. The Wiki does not mention these in the requirements. Are these dependencies correct/needed ?!

Just being my paranoid self ;)


Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: [ANNOUNCE] smeserver-zabbix
« Reply #14 on: March 31, 2009, 06:06:29 PM »
When installing the zabbix-agent as an dependency the 'smeserver-remoteuseraccess' contrib is installed and 'e-smith-formmagick' is updated. The Wiki does not mention these in the requirements. Are these dependencies correct/needed ?!

Just being my paranoid self ;)
You're right, it should be documented. I've added smeserver-remoteuseraccess contrib in the dependency list because zabbix adds template /etc/sudoers. On a stock SME, this file isn't templetized, and the remoteuseraccess contribs add the required templates, especially /etc/e-smith/templates.metadata/etc/sudoers which sets the correct permission. So the solution were:
- to add remoteuseraccess as a dependency
- to mark remoteuseraccess in the conflict list
As I use this contrib on a lot of servers, I've choosed the first solution.
C'est la fin du monde !!! :lol: