Announcement

Collapse
No announcement yet.

Temples and very long checks (trapper? agent?)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Temples and very long checks (trapper? agent?)

    I have a ruby script that runs some simple statistics via a MySQL connection, and on some larger databases, they may take ~10 seconds, but assume that under heavy load, they can take a minute or so. Here's my predicament as it currently stands (and please call me out if anything here is incorrect):

    If I use a UserParameter and zabbix_get, I get "ZBX_NOTSUPPORTED" on the long ones. The #zabbix channel on Freenode suggested that I use zabbix_sender to push the results directly to a trapper, however...

    If I use a sender/trapper, I can't seem to create universally-unique templates. On the server (via the web interface), I need to have a unique identifier in "Key", and it apparently doesn't take macros, so this means a couple dozen items across about a hundred agents. Not maintainable

    Any suggestion on what to do here?

    #2
    Originally posted by Synthead View Post

    If I use a sender/trapper, I can't seem to create universally-unique templates. On the server (via the web interface), I need to have a unique identifier in "Key", and it apparently doesn't take macros, so this means a couple dozen items across about a hundred agents. Not maintainable

    Any suggestion on what to do here?
    Couple of dozen? Is that all? The key only has to be unique to each host. So, if you template it you can apply the same config to each host.

    If you do actually need to do large scale provisioning then look at using the api.

    Regards,
    David

    Comment


      #3
      Yello, has right.

      You have to have uniqe Key only inside one Template.

      Your sender script should looks like this:

      # pseudo script

      SQL='get statistics from SQL table"

      from row=1 to the_end do
      {
      HOSTNAME=column[1]
      KEY=column[2]
      VALUE=column[3]
      zabbix_sender -z $SERVER -s $HOSTNAME -k $KEY -v $VALUE
      }

      Zabbix sender is awesome utility, this is only simple example.

      Best,
      Grzegorz

      Comment

      Working...
      X