Ad Widget

Collapse

Finding agent versions using SQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lasseoe
    Junior Member
    • Aug 2008
    • 15

    #1

    Finding agent versions using SQL

    I'm in the process of upgrading agents from 2.0.x to 2.2.x, and I didn't want to have to logon to a bunch of servers just to find out they already had the latest agent, so I poked around the zabbix DB and came up with this.

    Code:
    mysql> select hosts.host,history_str.value,from_unixtime(max(history_str.clock)) from hosts inner join items on hosts.hostid=items.hostid inner join history_str on items.itemid=history_str.itemid where items.key_ like 'agent.version' group by hosts.host;
    Should give you Hostname, Agent Version and the last time the agent version was updated.

    Hope someone finds it useful.
Working...