3

I'm trying to track a process that locks up regularly. It's a funky program that we have no control over. I'm trying to find a good way to track when the program stops responding.

I have a query which has a result... It comes back with 2 numbers: an integer and a time. The integer is "Items in Queue" and the time is "Time last item was processed".

What I'm trying to find out... is what is the best way to get these result into the Zabbix Database? How can I query SQLServer\DatabaseX either once to populate two items... or twice to seperately fill these two Items? Can I use Zabbix to run a Stored Procedure (which can be set to return whatever) and return that info via Agent?

IF I can get the result of a stored procedure... can I update two Items with one result or would i have to have two queries?

Jim B
  • 23,938
  • 4
  • 35
  • 58
WernerCD
  • 344
  • 2
  • 6
  • 18

2 Answers2

2

The zabbix_sender program is going to be your most portable way to push the item into the Zabbix db. You will need to write a script which takes the resultant data, splits it into two then sends the two items back using the zabbix_sender as it can handle mutliple values, if properly formatted.

Zabbix Sender man page

Red Tux
  • 2,074
  • 13
  • 14
  • I'm still working out my bash script (need to parse two fields from a single sql query into two variables... and Zabbix_Sender them individually)... and I'll probably have a follow up question about datetime data and triggers shortly. This looks like it'll fit what I have working and want to do. – WernerCD Jun 01 '11 at 19:18
1

For extra DB metrics collection check DBforBIX:

http://www.smartmarmot.com/2011/05/dbforbix-0-2dbforbix-now-run-on-windows-as-a-service/

It supplies a Query List File to auto run your customized queries.

Joao Figueiredo
  • 208
  • 2
  • 9
  • I can't get it to work (and I have to move onto bigger things atm)... I upvoted because I do find it interesting and it looks promising. Will be useful if I can get it to work for tracking stuff "later". – WernerCD Jun 01 '11 at 19:16
  • Some mandatory parameters in the config.props file which may be the cause for your problem: ZabbixServerList DatabaseList # a pair for each DB name added to DatabaseList, both must be preceded by the corresponding DB name. .User .Password QueryListFile It'll die if any of those is incorrectly configured. – Joao Figueiredo Jun 27 '11 at 11:05