This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Create an alert if F5 connections get to high

I couldn't find an out-of-the-box solution for seeing the current connections on each virtual server for a F5 loadbalancer so I created a poller for this. Now my goal is to alert when some of them go above a certain number. I am only working with one of the virtual servers as a test. It appears that I need to do some sort of SQL query to do this but I do not know how to create an alert from this. Below is my SQL query that works in MS Studio. I can also use it to return a value into the email I have being generated. What am I missing?

SELECT CustomPollerStatusTable.NumValue

FROM CustomPollerStatusTable

WHERE (

  CustomPollerStatusTable.PollerID = '7BEEB32A-8FD8-4EA8-9003-031C9FFDC391' and

  CustomPollerStatusTable.FullLabel = '/Common/SomeVirtualServer on ProdF5' and

  CustomPollerStatusTable.NumValue >=300

)

I tried to do this using the Advanced SQL Alert but the pre-defined stuff is messing me up. I tried the below code to trick it but I think I don't understand how this works.

SELECT CustomPollerStatusTable.CustomPollerAssignmentID, CustomPollerStatusTable.CompressedRowID, CustomPollerStatusTable.FullLabel FROM CustomPollerStatusTable

WHERE 0 = 1

SELECT CustomPollerStatusTable.NumValue

FROM CustomPollerStatusTable

WHERE (

  CustomPollerStatusTable.PollerID = '7BEEB32A-8FD8-4EA8-9003-031C9FFDC391' and

  CustomPollerStatusTable.FullLabel = '/Common/SomeVirtualServer on ProdF5' and

  CustomPollerStatusTable.NumValue >=300

)

  • What version of NPM are you using? I'm still only on 11.0.1 and it has an out of the box resource called F5 Device Connections. This resource shows the current connections.

    Then in Advanced Alert Manager I have a rule as follows. Works great.

    Capture.JPG

  • Hey Superfly99,

    We are running 11.5.2. I tried what you suggested previously but this only shows overall connection count and not per virtual server like I was looking for. My goal is to protect the servers behind the loadbalancer. I actually came up with a solution yesterday.

    Here is a picture of my script. What I didn't realize about SQL was that even though I didn't use NumValue in the select statement I could still use it for search criteria in my where statement. The Custom SQL Alert will trigger if anything is returned from the SQL query. In my case I am searching both the active and standby F5 for the connection counts of one of my virtual servers. If the NumValue is greater than the set value (in my case 800) then the query returns some data (not the NumValue but the AssignmentID, RowID and FullLabel) and the alert is triggered. As a bonus I included the current connection count in my email alert to allow us to know where it was when the alert was triggered. This was done by simply adding the following variable to my e-mail message section under trigger action.

    Current connection count for ProdF5Virtual Server is ${SQL:SELECT CustomPollerStatusTable.NumValue FROM CustomPollerStatusTable WHERE (  CustomPollerStatusTable.PollerID = '7BEEB32A-8FD8-4EA8-9003-031C9FFDC391' and CustomPollerStatusTable.FullLabel = '/Common/ProdF5VirtualServer on ProdF5#1' )} on ProdF5#1 and ${SQL:SELECT CustomPollerStatusTable.NumValue FROM CustomPollerStatusTable WHERE (  CustomPollerStatusTable.PollerID = '7BEEB32A-8FD8-4EA8-9003-031C9FFDC391' and CustomPollerStatusTable.FullLabel = '/Common/ProdF5VirtualServer on ProdF5#2' )} on ProdF5#2

    sql script.JPG

  • Sorry that I missed the bit about virtual servers. Glad you got it sorted!