Forum Discussion
tarsier_90410
Nimbostratus
Aug 25, 2009way to list pools?
I am trying to find a way for an irule (9.x LTM) to query for a list of all pools on the system, but so far have not found a way to do so. Is this possible?
62 Replies
- The_Bhattman
Nimbostratus
I think the this is unique to version 9.4.x branch because I don't see this in 9.3.x branches and below.
CB - Glen_91715
Nimbostratus
Thanks Aaron and David,
Between the "db bigpipe.displayservicenames false" and the awk sub its now done the trick.
Thanks - The_Bhattman
Nimbostratus
The Pool status has been updated in the samples section of devcentral
http://devcentral.f5.com/wiki/default.aspx/iRules/Pool_Member_Status_Page_on_a_Virtual_Server.html
CB - Chris_FP
Cirrus
I've tried to get the iRule [http://devcentral.f5.com/wiki/default.aspx/iRules/Pool_Member_Status_Page_on_a_Virtual_Server.html] working but to no avail :-(
Do you need to restart the BIGIP to get the cron job to be activated or am I missing something.
Basically I get the text below (the status, pool name, member, port are shown in boxes)
BIGIP Pool Member Status - Tue Dec 08 17:42:05 GMT 2009
Status Pool Name Member Port
If I run the commands manually from the CLI the page will display the pools but obviously any refresh doesn't update, I just get the same screen over and over. - The_Bhattman
Nimbostratus
Hi Chris,
Can you post your version of the iRule? Also which version of the LTM are you using?
Bhattman - Chris_FP
Cirrus
The iRule is exactly as it is from the URL I put in my last reply.
Version info
----------------
Kernel:
Linux 2.4.21-9.3.1.37.0smp
Package:
BIG-IP Version 9.3.1 58.0
Hotfix HF4 Edition - The_Bhattman
Nimbostratus
Hi Chris,
From your description it seems like the data group object is empty - defined but not able to read the file properly and thus not populating the class variable.
What you could do is insert a log entry to see if $::pool_member_status_list is populated
You could put the following before the FOR-LOOP
log local0. "The following contents for class POOL Member Status is: $::pool_member_status_list"
You can then run the irule and see what it's output is in the LTM logs. It should display the contents of "pool_member_status_list.class" file.
I hope this helps
Bhattman - Chris_FP
Cirrus
I did add the log command and got the following:-
"Rule pool_status HTTP_REQUEST: The following contents for class POOL Member Status is: "
From what I can see the cron job does not appear to run as the [pool_member_status_list.class] file in \var\class is never created.
Is there anyway to tell if the cron job actually runs? - The_Bhattman
Nimbostratus
Hi Chris,
First check to see if cron daemon is running
Second check the contents of the crontab to see if the cron.daily entry exists and that is sequenced to fire off
Third make sure the permission for the cron file can execute
You can also change an entry in crontab for cron.daily to
02 4 * * * root run-parts /etc/cron.daily >/var/log/crondaily.log 2>&1
This should create a crondaily.log to determine if it kicked-off.
I hope this helps
Bhattman - Chris_FP
Cirrus
First check to see if cron daemon is running
My Unix/Linux is not as good as it should be but output from ps -ef seems to indicate that it is
"1131 ? S 0:13 crond CONSOLE=/dev/console TERM=linux INIT_VERSION=sysvinit-2.85 PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin RUNLEVEL=3 runlevel=3 PWD=/ LANG=C PREVLEVEL=N previous=N platform=D84 SHLVL=2 _=/sbin/initlog"
----------------------------------------------
Second check the contents of the crontab to see if the cron.daily entry exists and that is sequenced to fire off
crontab contains :-
cron tab for root
1-59/30 * * * * /usr/bin/diskmonitor
Not sure what I would need to put in the crontab file
----------------------------------------------
Third make sure the permission for the cron file can execute
You can also change an entry in crontab for cron.daily to
02 4 * * * root run-parts /etc/cron.daily >/var/log/crondaily.log 2>&1
This should create a crondaily.log to determine if it kicked-off.
I added the line above and crondaily.log file is not created.
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
