Fortinet black logo

New Features

Add REST API for IPS session monitoring 7.2.4

Add REST API for IPS session monitoring 7.2.4

The /api/v2/monitor/ips/session/performance REST API can be used to query the FortiGate for its IPS session information. This API retrieves the output of diagnose ips session performance, and it can provide the diagnose ips session information to FortiManager.

To use the API with a browser:
  1. Open the browser and enter https://<FortiGate_IP_address>/api/v2/monitor/ips/session/performance. A token is not required.
  2. The browser displays the output similar to the following:
    {
      "http_method":"GET",
      "results":[
        {
          "pid":7093,
          "memory":129460224,
          "cycles":{
            "decoder":2613,
            "session":1025,
            "protocol":31526,
            "application":2283463,
            "match":30993,
            "nc_match":2180,
            "cross_tag":18637
          },
          "packets":{
            "decoder":74,
            "session":74,
            "protocol":74,
            "application":74,
            "match":4,
            "nc_match":98,
            "cross_tag":4
          }
        }
      ],
      "vdom":"vd1",
      "path":"ips",
      "name":"session",
      "action":"performance",
      "status":"success",
      "serial":"FG1K5D3I13800000",
      "version":"v7.2.2",
      "build":1319
    }
To use the API with a Postman REST client or web client:
  1. Configure the REST API administrator and generate the token (see REST API administrator in the FortiOS Administration Guide for more details).
  2. Create a new request in the client for the HTTP method, GET, and enter the URL (https://<FortiGate_IP_address>/api/v2/monitor/ips/session/performance?access_token=<token>).
  3. The client displays the output similar to the following:
    {
      "http_method":"GET",
      "results":[
        {
          "pid":7475,
          "memory":127750680,
          "cycles":{
            "decoder":1922,
            "session":789,
            "protocol":3692,
            "application":907777,
            "match":4997,
            "nc_match":8029,
            "cross_tag":0
          },
          "packets":{
            "decoder":252,
            "session":252,
            "protocol":252,
            "application":205,
            "match":5,
            "nc_match":16,
            "cross_tag":0
          }
        }
      ],
      "vdom":"vd1",
      "path":"ips",
      "name":"session",
      "action":"performance",
      "status":"success",
      "serial":"FG1K5D3I13800000",
      "version":"v7.2.2",
      "build":1319
    }
To use a VDOM parameter in the API:
  1. Enter the URL in the browser or client, https://<FortiGate_IP_address>/api/v2/monitor/ips/session/performance?vdom=root. This example will only retrieve performance information under the root VDOM.
  2. Output is displayed similar to the following:
    {
      "http_method":"GET",
      "results":[
        {
          "pid":7093,
          "memory":129461024,
          "cycles":{
            "decoder":2511,
            "session":1058,
            "protocol":61812,
            "application":861188,
            "match":8927,
            "nc_match":1917,
            "cross_tag":16281
          },
          "packets":{
            "decoder":268,
            "session":268,
            "protocol":268,
            "application":258,
            "match":44,
            "nc_match":440,
            "cross_tag":38
          }
        }
      ],
      "vdom":"root",
      "path":"ips",
      "name":"session",
      "action":"performance",
      "status":"success",
      "serial":"FG1K5D3I13800000",
      "version":"v7.2.2",
      "build":1319
    }

Add REST API for IPS session monitoring 7.2.4

The /api/v2/monitor/ips/session/performance REST API can be used to query the FortiGate for its IPS session information. This API retrieves the output of diagnose ips session performance, and it can provide the diagnose ips session information to FortiManager.

To use the API with a browser:
  1. Open the browser and enter https://<FortiGate_IP_address>/api/v2/monitor/ips/session/performance. A token is not required.
  2. The browser displays the output similar to the following:
    {
      "http_method":"GET",
      "results":[
        {
          "pid":7093,
          "memory":129460224,
          "cycles":{
            "decoder":2613,
            "session":1025,
            "protocol":31526,
            "application":2283463,
            "match":30993,
            "nc_match":2180,
            "cross_tag":18637
          },
          "packets":{
            "decoder":74,
            "session":74,
            "protocol":74,
            "application":74,
            "match":4,
            "nc_match":98,
            "cross_tag":4
          }
        }
      ],
      "vdom":"vd1",
      "path":"ips",
      "name":"session",
      "action":"performance",
      "status":"success",
      "serial":"FG1K5D3I13800000",
      "version":"v7.2.2",
      "build":1319
    }
To use the API with a Postman REST client or web client:
  1. Configure the REST API administrator and generate the token (see REST API administrator in the FortiOS Administration Guide for more details).
  2. Create a new request in the client for the HTTP method, GET, and enter the URL (https://<FortiGate_IP_address>/api/v2/monitor/ips/session/performance?access_token=<token>).
  3. The client displays the output similar to the following:
    {
      "http_method":"GET",
      "results":[
        {
          "pid":7475,
          "memory":127750680,
          "cycles":{
            "decoder":1922,
            "session":789,
            "protocol":3692,
            "application":907777,
            "match":4997,
            "nc_match":8029,
            "cross_tag":0
          },
          "packets":{
            "decoder":252,
            "session":252,
            "protocol":252,
            "application":205,
            "match":5,
            "nc_match":16,
            "cross_tag":0
          }
        }
      ],
      "vdom":"vd1",
      "path":"ips",
      "name":"session",
      "action":"performance",
      "status":"success",
      "serial":"FG1K5D3I13800000",
      "version":"v7.2.2",
      "build":1319
    }
To use a VDOM parameter in the API:
  1. Enter the URL in the browser or client, https://<FortiGate_IP_address>/api/v2/monitor/ips/session/performance?vdom=root. This example will only retrieve performance information under the root VDOM.
  2. Output is displayed similar to the following:
    {
      "http_method":"GET",
      "results":[
        {
          "pid":7093,
          "memory":129461024,
          "cycles":{
            "decoder":2511,
            "session":1058,
            "protocol":61812,
            "application":861188,
            "match":8927,
            "nc_match":1917,
            "cross_tag":16281
          },
          "packets":{
            "decoder":268,
            "session":268,
            "protocol":268,
            "application":258,
            "match":44,
            "nc_match":440,
            "cross_tag":38
          }
        }
      ],
      "vdom":"root",
      "path":"ips",
      "name":"session",
      "action":"performance",
      "status":"success",
      "serial":"FG1K5D3I13800000",
      "version":"v7.2.2",
      "build":1319
    }