Forum Discussion
EAV monitor file for DB2
Does anyone know how I can create an EAV file to monitor DB2 databases base on this argument:
Select count(*) from SYSIBMADM.SNAPHADR where HADR_ROLE = 'PRIMARY'
If it returns 1, it's the primary. If it returns 0, it's not the primary.
Thanks in advance for any help or input.
2 Replies
Hi!
Lacking experience with DB2, but don't you need some kind of authentication before sending queries to the DB? Otherwise you could try a normal TCP monitor with a send and receive string?
Send string: Select count(*) from SYSIBMADM.SNAPHADR where HADR_ROLE = 'PRIMARY'\r\n Receive string: 1If this doesn't work I bet Kevin will come soon and save the day. 🙂
/Patrik
- Kevin_Stewart
Employee
I may be missing something here, but there's no DB2-specific EAV monitor. There's MSSQL, MySQL, and PostgreSQL. Further, I don't believe the SQL communication is raw text, so not sure a TCP monitor would work. It might be possible to use one of the defined SQL monitors here, in which case user, pass, and database are configuration fields. It may also be possible to use mysql from a script to query the database, but not really certain on any of these. I suppose if I had no other options, I might consider standing up a small LAMP environment and creating a PHP SQL connector from a web page, then simply monitoring that page to check the database.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com