Skip to main content
miky
New Member
October 23, 2011
Question

OID for active sessions in load balancing

  • October 23, 2011
  • 5 replies
  • 10584 views
Hello, I doubt there is an answer but I have a virtual server that load balance connections on 2 real servers. On the interface Firewall Objects > Monitor > Load Balance Monitor I can see that I have X sessions for RealServer1 and Y sessions for RealServer2. I would like to retrieve the number of " Active Sessions" by snmp. Did someone have any success doing that ? Thanks

    5 replies

    harald21
    New Member
    October 27, 2011
    Hello, I monitor the number of active sessions by snmp using PRTG. Usefull OID' s can you find here: http://www.oidview.com/mibs/12356/FORTINET-FORTIGATE-MIB.html Sincerely Harald
    miky
    mikyAuthor
    New Member
    November 26, 2011
    Thank you for your answer. I haven' t been able to find the corresponding OID, what are the OIDs polled by you PRTG ? NB: I' m not talking about nat sessions but about the load balancing
    harald21
    New Member
    November 28, 2011
    Hello miky, the oid for " overall" sessions is: fgSysSesCount = 1.3.6.1.4.1.12356.101.4.1.8 I dont have any information to break this number down to nat, vip or lb sessions. Sincerely Harald
    bahman
    New Member
    April 24, 2019

    hi

    any update ?

    can i monitor active season ( per policy ) or LB season and etc ? 

    wect
    New Member
    February 15, 2026

    i was able to get this statistics and much more through API, you can also use filters in your API requests. The example with curl is below:

    # curl --insecure -H "Accept: application/json" -H "Authorization: Bearer <Your API Key>" 'https://<your FG IP>/api/v2/monitor/firewall/load-balance?count=-1&format=virtual_server_name|list&filter=virtual_server_name=@example.com%20HTTPS'

     

    the output would be as follows:

    {
    "http_method":"GET",
    "results":[
    {
    "virtual_server_name":"example.com HTTPS",
    "list":[
    {
    "real_server_ip":"10.0.0.1",
    "real_server_port":443,
    "real_server_id":1,
    "mode":"active",
    "status":"up",
    "monitor_events":153,
    "active_sessions":49,
    "RTT":"<1",
    "bytes_processed":123825819983
    },
    {
    "real_server_ip":"10.0.0.2",
    "real_server_port":443,
    "real_server_id":5,
    "mode":"active",
    "status":"up",
    "monitor_events":137,
    "active_sessions":52,
    "RTT":"<1",
    "bytes_processed":123673959605
    }
    ]
    }
    ],
    "vdom":"root",
    "path":"firewall",
    "name":"load-balance",
    "status":"success",
    "serial":"FGTXXXXXXXXXXXX",
    "version":"v6.4.16",
    "build":2098
    }

    Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
    Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.
    Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!