View Full Version : UserParameter for zabbix_server?
I need to use a 3rd party tool to monitor a special service. I can get by setting UserParameter in each agent, but that requires me to install this 3rd party tool on every server that is being monitored which is a big pain!
Is it possible to have something like UserParameter that I can use for zabbix_server?
siebrand
25-04-2005, 21:06
Isn't it possible to have the one 3rd party tool monitor all the services on different servers from 1 server using multiple UserParameter designations?
________
LEGAL MARIJUANA DISPENSARY (http://dispensaries.org/)
Wouldn't this put all the collected data under the 1 server? I'm trying to have the data recorded under their respective machine.
siebrand
27-04-2005, 19:02
Wouldn't this put all the collected data under the 1 server? I'm trying to have the data recorded under their respective machine.
From my perspective you will present the data in a graph and ultimately in a screen. Just name the graph/screen after the machine or process you're reporting about.
Another option: define multiple machines with the same IP address and monitor the UserParameter from there.
Just do not delete your monitor host because you will lose data about all the other hosts... :p
________
Live sex (http://livesexwebshows.com/)
ZABBIX v1.1 will possibly introduce 'external checks' , i.e. checks executed on ZABBIX server, kind of server-side UserParameters.
jpawlowski
31-05-2005, 14:14
this would be great!
however I would also like to have the UserParameter in the agent to support variable parameters for the executed command.
however I would also like to have the UserParameter in the agent to support variable parameters for the executed command.It is already supported! Define your parameter as (for example):
UserParameter=test
, echo
Then you may add items test[1], test[5], test[hello], etc. The '1', '5' and 'hello' will be passed to 'echo' as command line parameter.
The following command will be executed:
echo 1
echo 5
echo hello
jpawlowski
31-05-2005, 14:21
GREAT!!! thnx :-)
so until the external checks are directly supported by the server, I just create userparameters for the agent on the zabbix-server itself.
jpawlowski
31-05-2005, 14:56
Btw: I had to modify the structure of mysql-table "items": field "key_" max length of 64 is not enough as I would like to be the parameter a URL. so i altered table with 'key_'=VARCHAR(128)
It is already supported! Define your parameter as (for example):
UserParameter=test
, echo
Then you may add items test[1], test[5], test[hello], etc. The '1', '5' and 'hello' will be passed to 'echo' as command line parameter.
The following command will be executed:
echo 1
echo 5
echo hello
Can I access the key parameter (e.g. 1, 5, hello) through a variable?
Regards,
Frank.
Hi,
I want to Monitor the amount of used disk space in percent with zabbix and wrote a little perl script to do so. The script itself is working, but if I try to use it with zabbix by invoking the following key:
capacity[/]
and this User Parameter:
UserParameter=capacity ,/usr/local/zabbix/bin/zsizeof.pl -f
I get in the shell on which the zabbix_agentd has been started the following error message:
sh: /: cannot execute
I use zabbix 1.0 on Solaris 10
Regards,
Frank.
Wolfgang
16-07-2005, 12:27
Did you check:
She-Bang Line?
Permissions?
eXecute Flag?
andresherrera
22-01-2006, 10:56
It is already supported! Define your parameter as (for example):
UserParameter=test
, echo
Then you may add items test[1], test[5], test[hello], etc. The '1', '5' and 'hello' will be passed to 'echo' as command line parameter.
The following command will be executed:
echo 1
echo 5
echo hello
I, write a litle script to count the process runing for specific command and add the following line to the agentd config file:
UserParameter=WorkingProcess ,/home/zabbix/scripts/working_process.sh
I probe the script with this:
[root@router zabbix]# /home/zabbix/scripts/working_process.sh mysqld
0
Next add the item:
WorkingProcess[mysqld]
But i receive this message on the onsole:
sh: line 1: mysqld: command not found
I have instaled zabbix 1.0
Can you help me?
Thanks
Andres Herrera
It looks like your script is trying to invoke mysqld? You will probably need to specify its full path, or setup the path environment variable yourself.
andresherrera
23-01-2006, 01:20
It looks like your script is trying to invoke mysqld? You will probably need to specify its full path, or setup the path environment variable yourself.
thanks Jack for your qickly responce, but the script only count the number of process runing and the parameter is only used for a regexp search, this is the code of the script:
#!/bin/bash
#Usage:
# working_process.sh daemonname
#
ps axr -o %c | grep ^$1\$ -c
And i probe the that script run under the user zabbix without problems.
I am running on Linux Redhat Enterprice 3.
Thanks!
Andres Herrera
Did you try using full paths to ps and grep?
andresherrera
23-01-2006, 17:58
Did you try using full paths to ps and grep?
Hi, and thanks again for your answer.
Today i have tried with many changes on the UserParameter with the same errors.
I try with the Alexi's example:
It is already supported! Define your parameter as (for example):
UserParameter=test , echo
Then you may add items test[1], test[5], test[hello], etc. The '1', '5' and 'hello' will be passed to 'echo' as command line parameter.
The following command will be executed:
echo 1
echo 5
echo hello
The result is the same, but now the error on the console are:
sh: line 1: 1: command not found
Then i tested this item:
test[echo 2]
The result was succesful, the system send back "2" as a result!
Then i think this is a bug or a feature that is not supported on my version of zabbix 1.0.
I read for many minutes the source code of the agent and found that my thoughs are correct:
UserParameter=myparam ,/any/command
with the item: myparam[myrealcommand]
Result on execution of
"myrealcommand"
instead of
"/any/command myrealcommand"
For now, i'll create items with this "bug", but i think that must be changed on the new versions.
Thanks!
Andres Herrera