Ad Widget

Collapse

answer my UserParameter question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • colin7151
    Junior Member
    • Oct 2006
    • 9

    #1

    answer my UserParameter question

    Ok,

    So after giving up on Sun's N1 management software, I would love to get some of the hardware monitoring into my zabbix deployment. I seem to be having issues with getting correct values returned by the user parameters i am creating.

    Client:
    Code:
    UserParameter=hardware.raid,mpt-status | grep OPTIMAL | wc -l
    
    [root@RHL018 batch]# zabbix_agentd -t hardware.raid
    hardware.raid                                 [t|1]
    
    [root@RHL018 batch]# zabbix_agentd -V
    ZABBIX Agent (daemon) v1.4.2 (20 August 2007)
    Compilation time:  Oct 25 2007 20:23:31
    Server
    Code:
    [root@RHL012 log]# zabbix_server -V
    ZABBIX Server (daemon) v1.4.2 (20 August 2007)
    Compilation time:  Oct 25 2007 00:26:29
    
    [root@RHL012 log]# zabbix_get -s xxx.xxx.xxx.xxx -k hardware.raid
    0
    I have the datatype for the item set as a integer. Is the datatype info where things are getting messed up ? Would a result of "[t|1]" indicate that it is seeing my result as text ? Any ideas how I can fix this ?

    FYI the test should always return a "1" unless the array fails, in which case it should be a "0". For the purpose of this, I am trying to get it to return a "1" to the zabbix server. Oh and the $5 is in free credit to grooveshark.com.
    Last edited by vitalijs.m; 23-07-2021, 14:53.
  • knarfling
    Member
    • Sep 2006
    • 47

    #2
    I do not know if this makes a difference or not, but I have been bitten by this a few times. When you use zabbix_get from the server, it tries to execute the UserParameter as the zabbix user you created on the client. When you are running the test, you are running it as root. When I ran into this problem, it was a permissions issue. I had created a zabbix user and when I su'd to zabbix and tried running zabbix_agentd - t UserParameter, it would not work because zabbix did not have the right permissions.

    A simple way to fix that would be to add a no password line for zabbix to sudo that particular software.

    Comment

    • bbrendon
      Senior Member
      • Sep 2005
      • 870

      #3
      I've never used zabbix_get before, and alas, I thought it would be very easy, to claim the $5 ...I can't get zabbix_get to do anything. It just prints a blank line no matter what I ask for.

      I've used zabbix_sender and zabbix_agent -t many times.

      AFAIK:
      u = unsigned
      t = text
      d = float
      s = string

      As far as datatypes, I think it should auto-convert the text to unsigned.
      Unofficial Zabbix Expert
      Blog, Corporate Site

      Comment

      Working...