Ad Widget

Collapse

Zabbix sender help please

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fisher
    Junior Member
    • Oct 2008
    • 27

    #1

    Zabbix sender help please

    I having trouble using zabbix_sender. My script produces a data file like:

    - openvz.values[101,kmemsize,held] 5026985
    - openvz.values[101,kmemsize,maxheld] 9245019
    - openvz.values[101,kmemsize,barrier] 115201800
    - openvz.values[101,kmemsize,limit] 115201800
    - openvz.values[101,kmemsize,failcnt] 0
    - openvz.values[101,lockedpages,held] 0
    - openvz.values[101,lockedpages,maxheld] 0
    - openvz.values[101,lockedpages,barrier] 256
    ...and so on. If I am right the dash at the begining means the zabbix_sender use the hostname found in the config file:

    zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -z 172.16.8.254 -i "${SENDERFILE}"
    The sender says:
    zabbix_sender [17335]: DEBUG: Answer [{
    "response":"success",
    "info":"Processed 0 Failed 250 Total 250 Seconds spent 0.001421"}]
    Info from server: "Processed 0 Failed 250 Total 250 Seconds spent 0.001421"
    My keys created like this:

    openvz.values[101,kmemsize,failcnt]




    Not all the keys are created (yet) but all refused to be processed.

    I can not see any related trouble in the server log and would not increase the debug level yet due the amount of debug it would produce. I believe I made a basic mistake, please advise.
    Last edited by fisher; 21-12-2011, 12:11.
  • bcarpio
    Member
    • Jun 2008
    • 96

    #2
    Wrong format

    Looks like your format might be off here is an example from a mongo template we/I use. The format is:

    <zabbix_name_in_gui> <key_name> <data_value>

    mongo-server repl_member_attention_state_count 0
    mongo-server repl_member_attention_state_info empty
    mongo-server oplog.rs_count Object
    mongo-server mongoDB_plugin_data_collection_time 0
    mongo-server mongoDB_plugin_version 0.3
    mongo-server mongoDB_plugin_checksum a7609ec8dac0f044a6ab5aab9604f4f8
    mongo-server opcounters_command 4839633


    Here is how one of the items looks in the gui



    Also make sure your key "Type of information" is set properly the values which give text should state "Text" etc..

    Comment

    • fisher
      Junior Member
      • Oct 2008
      • 27

      #3
      The only difference I can see is your keys are it.is.a.key.name format instead the mine it.is[a,key,name]. It would be the problem?

      Comment

      • bcarpio
        Member
        • Jun 2008
        • 96

        #4
        No space

        I am not sure if the [] creates a problem It shouldn't but I don't see a server name value in your output data file I just see "-" so maybe you did that just because you didn't want to expose the hostname? But the first field must match the hostname in the gui make sure to double check that.. Then I'd try and remove the [] just to see what happens.

        Comment

        • fisher
          Junior Member
          • Oct 2008
          • 27

          #5
          Regarding the docs: http://www.zabbix.com/documentation/.../zabbix_sender

          "Dash in the input data indicates that hostname also should be used from the same configuration file."


          the dash should not be a problem. I use the config file value to eliminate the possibility of any typo I will create a key.name.parameters keys to see if it helps.

          Comment

          • bcarpio
            Member
            • Jun 2008
            • 96

            #6
            Ah I didn't know that...

            Oh great, I didn't know that about the "-" so thats good, let me know what happens without the []

            Comment

            • fisher
              Junior Member
              • Oct 2008
              • 27

              #7
              Seems the problem is elsewhere. I have changed the keys to dotted and no luck not even when I try to load the values from the command line:

              # zabbix_sender -vv -c /etc/zabbix/zabbix_agentd.conf -k openvz.values.101.kmemsize.held -o 5024364
              zabbix_sender [15162]: DEBUG: Answer [{
              "response":"success",
              "info":"Processed 0 Failed 1 Total 1 Seconds spent 0.000023"}]
              Info from server: "Processed 0 Failed 1 Total 1 Seconds spent 0.000023"
              sent: 1; skipped: 0; total: 1
              I have created the key "openvz.values.101.kmemsize.held" zabbix trapper type.

              Comment

              • vlturner
                Junior Member
                • Aug 2011
                • 28

                #8
                Take a look at my perl script

                This uses the perl zabbix sender api.

                Join the friendly and open Zabbix community on our forums and social media platforms.


                This is very strait forward code.

                Comment

                • zabbix_zen
                  Senior Member
                  • Jul 2009
                  • 426

                  #9
                  "info":"Processed 0 Failed 1 Total 1 Seconds spent 0.000023"}]
                  fisher,
                  those errors are most frequently due to host, item name, or item type mismatch between the data sent and the way that host or item is setup on the Server.

                  I agree the error description per se doesn't help,
                  hopefully Zabbix SIA can improve this in Zabbix 2.0.
                  Please check it thoroughly.

                  Comment

                  • fisher
                    Junior Member
                    • Oct 2008
                    • 27

                    #10
                    I got the solution. I made the mistake, the allowed hosts field was not set but it must. However the zabbix server should have been logged an error but it did not so I got no any indication about the nature of the actual problem.

                    Comment

                    • Abhiram_Cloud4c
                      Junior Member
                      • Nov 2016
                      • 10

                      #11
                      facing same issue with zabbi agent active

                      hi fisher,

                      could you please let me know who the issues was solved.

                      i have configured active items in zabbix web....i am manually trying to push the data from zabbix proxy to zabbix app server using zabbix sender but facing the below error.

                      [root@cloudpro zabbix]# zabbix_sender -z 127.0.0.1 -s abhiram_test -k icmppingsec -o 0.13
                      info from server: "processed: 0; failed: 1; total: 1; seconds spent: 0.000341"
                      sent: 1; skipped: 0; total: 1

                      127.0.0.1 dummy ip.

                      Comment

                      Working...