PDA

View Full Version : Trouble with UserParameter on Freebsd


wonk
08-04-2005, 01:53
Greetings,

I have recently started using Zabbix 1.0 with the agentd running on FreeBSD 5.3. I want to add in some custom items to be monitored so I have decided to make use of the UserParameter feature. For a test I decided to start with something fairly simple, but I am unable to get it to work. The line in my zabbix_agent.conf is:

UserParameter=local[memtotal],sysctl hw.physmem | cut -f 2-2 -d " "

If I run this command from my shell it returns:

root@bozo/<1>local/etc/zabbix# sysctl hw.physmem | cut -f 2-2 -d " "
662130688
root@bozo/<1>local/etc/zabbix#

When I try to monitor the UserParameter from Zabbix it returns not supported. The agentd debug log shows:

017350:20050408:095003 In check_security()
017350:20050408:095003 Connection from [127.0.0.1]. Allowed servers [127.0.0.1]
017350:20050408:095003 Before read()
017350:20050408:095003 After read() 2 [16]
017350:20050408:095003 Got line:local[memtotal]
017350:20050408:095003 Sending back:ZBX_NOTSUPPORTED

I have searched the forum and with google but can't seem to find a solution. Any advice would be greatly appreciated :)

Cheers,

Rob

Alexei
08-04-2005, 08:43
Have you restarted ZABBIX agent after the UserParameter was added?

wonk
08-04-2005, 09:30
Have you restarted ZABBIX agent after the UserParameter was added?

Yes. I also tried changing the paramater name to something different (local-memtotal), and trying it with "UserParameter: local[memtotal]" as described in http://www.zabbix.com/manual/v1.1/config_extend.php (even though that is different to the examples in the .conf file).

I am happy to run some tests or provide more debug/tcpdump output to help reslove this.

Alexei
08-04-2005, 09:34
What version of ZABBIX you're running?

wonk
08-04-2005, 10:02
Version 1.0, from the Freebsd ports system.

klavs
09-04-2005, 19:08
I know this works for me in 1.1alpha7 (which seems just as stable as 1.0) - just note, that suckerd and trapperd has been replaced by zabbix_serverd :)