Ad Widget

Collapse

How can I graph an interger within file?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • luketrot
    Junior Member
    • Nov 2006
    • 14

    #1

    How can I graph an interger within file?

    I have a file in unix that consists of a single number that I want to graph. What would I use in Zabbix to pull the number from the file?
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    Define in zabbix_agentd.conf:

    UserParameter=catfile[*], cat $1

    Use item key catfile[/path/to/your/file] on server side.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • luketrot
      Junior Member
      • Nov 2006
      • 14

      #3
      Makes sense but it still doesn't appear to work. The Zabbix server says the cmd is unsupported. When I force it I get - for a data result. Zabbix Agent is clearly running and speaking with the server.

      Comment

      • RandySpinaGE
        Member
        • Jun 2006
        • 57

        #4
        Are you running Windows Agentd?

        Look at this thread #5


        Actually, you started that thread to.....and hidden down in your own thread was the possible answer. (if you are running windows)

        (I think)

        Try a specific hard coded filename to cat.. or actually "type"

        Comment

        • luketrot
          Junior Member
          • Nov 2006
          • 14

          #5
          FreeBSD 6.0

          Actually I'm not getting any data from the zabbix agent despite the fact the server says it is available. When I use the default Unix template it displays no data.

          Anythoughts? Once I get this working I suspect my cat script will work as well.

          Comment

          • RandySpinaGE
            Member
            • Jun 2006
            • 57

            #6
            Did you try running the agentd with "-p" option?

            for example /usr/local/bin/zabbix_agentd -p

            this will show you all the paramters the agentd is capable of gathering

            Comment

            Working...