Ad Widget

Collapse

Using zabbix_sender to propagate values for LLD Item Prototypes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phenixblue
    Junior Member
    • Nov 2014
    • 2

    #1

    Using zabbix_sender to propagate values for LLD Item Prototypes

    Is it possible to use zabbix_sender to feed values for LLD Item Prototypes?

    I have an LLD rule to discover HBA Ports (fcs devices) on AIX systems and Item Prototypes of type zabbix_trapper for various HBA Port stats. I have another script that collects HBA Port stats every 2 seconds at 30 second intervals and I want to then feed those values after the fact using zabbix_sender.

    I have been able to do this with statically defined items/keys within a template, but it's unsuccessful when dealing with item prototypes and key names containing a macro.

    My Item prototypes have keys like "aix.perf.fc.tput["{#FCPORT_NAME}"]" which get expanded as "aix.perf.fc.tput["fcs3"]" properly after the initial discovery rule runs.

    Here's what I get when I try to manually enter a value for one of the keys using zabbix_sender:

    root@zabbix-server # echo server1.example.com aix.perf.fc.tput[fcs0] 25 | zabbix_sender --config /zabbix/etc/zabbix_agentd.conf -vv -i -
    zabbix_sender [25224]: DEBUG: answer [{
    "response":"success",
    "info":"processed: 0; failed: 1; total: 1; seconds spent: 0.000075"}]
    info from server: "processed: 0; failed: 1; total: 1; seconds spent: 0.000075"
    sent: 1; skipped: 0; total: 1



    There's not much I see in the logs and that appears to be a known issue with failures using zabbix_sender.


    Environment Info:

    Zabbix Server Version: 2.2.3 installed on RHEL 6.5
    Zabbix Sender Version: 2.2.7
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    Originally posted by phenixblue
    Is it possible to use zabbix_sender to feed values for LLD Item Prototypes?
    Theoretically it should be no problem (I never been trying so for me it is theory). LLD prototypes does not adds any restrictions about item types.
    Just try and tell us about results
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • phenixblue
      Junior Member
      • Nov 2014
      • 2

      #3
      Originally posted by kloczek
      Theoretically it should be no problem (I never been trying so for me it is theory). LLD prototypes does not adds any restrictions about item types.
      Just try and tell us about results
      kloczek,

      I have attempted it. The result of running zabbix_sender manually to feed the value is in my original post. It fails, but there isn't any specific information on why it fails in the output or logs.

      Comment

      • kloczek
        Senior Member
        • Jun 2006
        • 1771

        #4
        Originally posted by phenixblue
        kloczek,

        I have attempted it. The result of running zabbix_sender manually to feed the value is in my original post. It fails, but there isn't any specific information on why it fails in the output or logs.
        First try to check host items list do you see tapper type items generated ly LLD. Second: how you are sending your item?

        You must communicate with your zabbix server or proxy. Try to test it by:
        Code:
        zabbix_sender -z <zbx.srv.or.prx.addr> -s <monitored.hostname> -k <item.name> -o "<value>" -vv
        On using above you should see something like my test output:
        Code:
        zabbix_sender [21563]: DEBUG: answer [{
        	"response":"success",
        	"info":"processed: 1; failed: 0; total: 1; seconds spent: 0.000048"}]
        info from server: "processed: 1; failed: 0; total: 1; seconds spent: 0.000048"
        sent: 1; skipped: 0; total: 1
        On above output as you see are details about processing value and status of this operation.

        And last thing. If your LLD iterator uses trapper item of course until something will not send first value of this item you will not see created items in you host items
        http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
        https://kloczek.wordpress.com/
        zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
        My zabbix templates https://github.com/kloczek/zabbix-templates

        Comment

        • geniepage
          Member
          • Sep 2015
          • 34

          #5
          Originally posted by phenixblue
          Is it possible to use zabbix_sender to feed values for LLD Item Prototypes?

          I have an LLD rule to discover HBA Ports (fcs devices) on AIX systems and Item Prototypes of type zabbix_trapper for various HBA Port stats. I have another script that collects HBA Port stats every 2 seconds at 30 second intervals and I want to then feed those values after the fact using zabbix_sender.

          I have been able to do this with statically defined items/keys within a template, but it's unsuccessful when dealing with item prototypes and key names containing a macro.

          My Item prototypes have keys like "aix.perf.fc.tput["{#FCPORT_NAME}"]" which get expanded as "aix.perf.fc.tput["fcs3"]" properly after the initial discovery rule runs.

          Here's what I get when I try to manually enter a value for one of the keys using zabbix_sender:

          root@zabbix-server # echo server1.example.com aix.perf.fc.tput[fcs0] 25 | zabbix_sender --config /zabbix/etc/zabbix_agentd.conf -vv -i -
          zabbix_sender [25224]: DEBUG: answer [{
          "response":"success",
          "info":"processed: 0; failed: 1; total: 1; seconds spent: 0.000075"}]
          info from server: "processed: 0; failed: 1; total: 1; seconds spent: 0.000075"
          sent: 1; skipped: 0; total: 1



          There's not much I see in the logs and that appears to be a known issue with failures using zabbix_sender.


          Environment Info:

          Zabbix Server Version: 2.2.3 installed on RHEL 6.5
          Zabbix Sender Version: 2.2.7
          Hello kloczek,
          I have to say: It is working without any problems. But debug is hard :-) I have template for aix which discovery fc, disks, vg's, hw and getting values from all these objects. All is donw via LLD and item prototypes. Also trigger prototypes, graph prototypes etc.

          Goo luck in testing and debug :-) I did it in 2 days. What you need is create good jason in discoevry, good UserParamters script and use zabbix_sender. No more you need.

          Regards
          Genie

          Comment

          Working...