Ad Widget

Collapse

Currency Example

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fnyahoo
    Junior Member
    • May 2013
    • 4

    #1

    Currency Example

    Good Day,

    I have been trying to implement currency example from Zabbix Documentation on my Zabbix Server. https://www.zabbix.com/wiki/howto/mo...exchange_rates

    keep in mind that the currency url has changed to http://themoneyconverter.com/rss-feed/USD/rss.xml

    so i changed my script accordingly to: UserParameter=currency[*],curl --silent 'http://themoneyconverter.com/rss-feed/USD/rss.xml' | sed -r "s/<title>/\n<title>/g" | grep "$2/$1" | cut -f2 -d"=" | cut -f2 -d" "

    and on the server side my item key parameter is currency[BAM,USD]

    still no go any ideas???

    error messages usually read received value [] is not suitable for value type numeric[float]
  • heaje
    Senior Member
    Zabbix Certified Specialist
    • Sep 2009
    • 325

    #2
    What do you get if you run the command from the userparameter on the commandline as the zabbix user?

    Comment

    • fnyahoo
      Junior Member
      • May 2013
      • 4

      #3
      [solved]

      ok I found where i was making the mistake. First of all, the url provided in that currency example is wrong, the site probably has changed their xml feed location, minor problem. The real deal was in parsing the lines in that xml feed. Once I have parsed the xml feed correctly, it worked fine.

      Comment

      Working...