Forum Discussion
jpolivy_46872
Nimbostratus
Sep 30, 2010Network Map on a Virtual Server
The only attempt at this I have seen is the award winning Pool_Member_Status iRule. That ones does not cover my needs, mainly what Node is up behind a particular Virtual Server, just like the LTN Network Map.
I would like anyone to be able to view a Network Map like interface without having to actually log into the device.
I spent some time beating on the original Pool_Member_Status and came up with this:
(Please don't laugh, I suck at coding and only even attempted this out of necessity)
Rehash from the Pool_Member_Status deployment guide with necessary modifications
1. Create a file in the following path on the LTM
/etc/cron.daily/virtual_status_list.cron
which contains:
!/bin/bash
b db bigpipe.displayservicenames false
bp virtual | egrep -e "POOL|VIRTUAL" | awk '{print "\""$1":"$2":"$3":"$4":"$5":"$6":\","}' > /var/class/virtual_status.class
b load
exit 0
2. Change the permissions by entering:
chmod +755 /etc/cron.daily/virtual_status_list.cron
3. Create a external datagroup
Main >> Local Traffic >> iRules
Select Data Group List
Click create
enter name: virtual_status
enter Type: External
Path / Filename: /var/class/virtual_status.class
File Content: String
4. Code is attached along with screen shots of sample output
Apply to a Virtual Server and hit the URL with "/status"
Any help cleaning this up would be greatly appreciated. Could probably be about half the size.
3 Replies
- jpolivy_46872
Nimbostratus
You will need to download the attachment (right click - save as) and change the extension to .txt to view the code.
- cweeklund_18634
Nimbostratus
This is exactly what I was looking for! However, I must be missing something because it's not quite working for me. Forgive me, I'm very new to all of this.
I can see the virtual_status.class file is populated with what looks to be good data. I have an external file data group list called "virtual_status". I have an iRule called "virtual_status" that has the contents of your .txt file. But when I browse to my virtual server, I only get the code at the top of the page (F5 Load Balancer Status - 10.10.10.10
Tue Oct 12 16:41:05 CDT 2010) and no virtual servers or pool members.
Any thoughts as to what might be missing? I was able to get the Pool_Member_Status irule to work, but like you said, it didn't have exactly what I was looking for.
Thanks! - The_Bhattman
Nimbostratus
Hi Jpolivy,
First off, excellent mod of the pool status irule. I was hoping someone would take the next step towards a different view of the Network Maps. You should post this up on the code share and also make note of which version of the LTM this is running on.
Cweeklund:
I think the problem maybe that you are running on a version of LTM where the output of the command
bp virtual | egrep -e "POOL|VIRTUAL" | awk '{print "\""$1":"$2":"$3":"$4":"$5":"$6":\","}'
is different then the LTM that Jpolivy is running on.
The iRule will have to modified to pick up the suttle differences depending on the version of LTM you are using.
I hope this helps
Bhattman
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
