Ad Widget

Collapse

just getting started - simple new item needed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jamied66
    Member
    • Sep 2008
    • 37

    #1

    just getting started - simple new item needed

    I'm just starting to use Zabbix as a monitoring tool for 500-600 remote sites running Linux, and I need to create a pretty simple item.

    I have a simple executable on each monitored system, /usr/bin/ss_version , which returns a string along the lines of "Application Version x.x". simple enough.

    I am trying to figure out how to use system.run or something similar to create an item for a host group that would contain the returned value of that executable.

    I'm using the latest stable 1.4.6 for both my server (Ubuntu 8.04) and agents (CentOS 5).

    Can someone get a noob nudged in the right direction?

    Thanks.
  • xs-
    Senior Member
    Zabbix Certified Specialist
    • Dec 2007
    • 393

    #2
    First of all i wouldnt use system.run (security implications), but rather make a UserParameter in the agentd.conf.

    Would be something like:
    UserParameter=ss_version,/usr/bin/ss_version

    Then you make an item (active agent pref) with
    Parameter: ss_version
    value type: Character
    Interval: Not too high, depending on how often you expect it to change.

    If you want to create a trigger on this value changing, you should use a delta function.

    NB.
    The output of the command MUST be 1 line, if its multiple, you should probably grep a single important line or concatenate all lines.

    Comment

    • jamied66
      Member
      • Sep 2008
      • 37

      #3
      Thanks for the help. I feel like it's ALMOST right, but I could use an experience set of eyes, please.

      In my zabbix_agentd.conf file:

      Code:
      UserParameter=ss_version,echo $SS_VER
      $SS_VER is a variable set that is the output of the executable i mentioned above. I've confirmed that it works as expecting (output is "1.0" on my test machine).

      On the Zabbix server I have the following parameters set:

      Item ZABBIX Test:SS Version
      Description - SS Version
      Type - Zabbix Agent (active)
      Key - ss_version
      Type of Information - Numeric(float)
      Use multiplier - Do not use
      Update Interval - 300 seconds
      Flexible Intervals - no flexible intervals
      Keep History - 90
      Keep Trends 365
      Status - Active
      Store Value - As Is
      Applications - None

      From everything I can read this SHOULD be giving the output I want from my test box, but I get nothing but an empty field in Monitoring > Overview > Data.

      Can someone please help out?

      Thanks.

      Comment

      • jamied66
        Member
        • Sep 2008
        • 37

        #4
        To add to my confusion:

        I set up the same situation on the zabbix server itself, just to make testing easier.

        zabbix_get works fine:
        @zabbix:~$ /usr/local/sbin/zabbix_get -s 127.0.0.1 -p 10050 -k ss_version
        1.0

        but I still get no output on the Monitoring screen in the Zabbix web gui.

        Comment

        • jamied66
          Member
          • Sep 2008
          • 37

          #5
          the saga continues.

          I AM now getting information (I switched it from zabbix agent (active) to zabbix agent). i also set the type of information to character for formatting purposes.

          It pulled the data right in.
          So to test I changed the value of this variable to 1.2

          @zabbix:~# echo $SS_VER
          1.2

          but it's still showing the previous value of 1.0, even after several update intervals, which is currently set to 300 seconds.

          Is there somethign I'm missing?

          Thanks again for any help.

          Comment

          • xs-
            Senior Member
            Zabbix Certified Specialist
            • Dec 2007
            • 393

            #6
            Hmm, i know there are some issues with the latest data tab of the stock 1.6 release.
            In the latest data tab view, there are links on the right of the screen: Graph / History (depending on the type of value). Use that to verify you aren't getting any data in.

            Furthermore, i would use character instead of int/float. A version isn't meant to be used as numeric value (i.e. you dont want graphs, you want a text history).

            Comment

            • jamied66
              Member
              • Sep 2008
              • 37

              #7
              Thanks for the reply.

              Amazingly, the final problem was user error.

              Since i had it echoing an environment variable, that variable wouldn't update unless it was re-exported or the users session restarted. bonehead move on that one.

              So I changed the parameter back to running the executable and it's working just as it should now.

              Thanks for the re-assurance! Always nice to have a forum to be a moron in when you're just getting started on a new app.

              Comment

              Working...