Forum Discussion
chris_connell_1
Nimbostratus
Dec 08, 2010Custom alert < n number of available nodes in pool
Hello
I need to send a trap if the members available (health up) of a specific pool is less than 5. How would I do this? would I have to write a custom script to check available members and if < 5 log to syslog which would be picked up by the alertd process?
Thanks
2 Replies
- hoolio
Cirrostratus
Hi Chris,
Yes, you could use tmsh with something like this to get a count of active members:
tmsh show ltm pool POOL_NAME detail | grep -c "Pool member is available"
Or using bigpipe:
b pool POOL_NAME show | grep -c "active,up"
Maybe someone has a cleaner way of getting this?
You could then use that in a script which calls logger:
logger -p local0.warning "Pool POOL_NAME has less than 5 members up"
Add that script to cron and run it however often you want to check the pool(s).
You could save the output from the pool count command and use that in the logger message.
You could then define a custom SNMP trap based on the message text:
SOL3727: Configuring custom SNMP traps
http://support.f5.com/kb/en-us/solutions/public/3000/700/sol3727.html
Aaron - chris_connell_1
Nimbostratus
As usual great answer, thanks Aaron.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects