Forum Discussion

Samir_M_355999's avatar
Samir_M_355999
Icon for Nimbostratus rankNimbostratus
Sep 05, 2018

F5 ASM : View System Variable from CLI

Hello,

 

For a subject of compliance, I need to know the values ​​of the variable systems. Example : guaranteed_remote_logging ; total_xml_request.

 

Since the GUI, it's easy enough. But I would like to run a "tmsh" command that lists the asm variables and their value.

 

There is the command: "tmsh list sys db" but this one is used for the hardware.

 

Thanks.

 

2 Replies

  • The settings for ASM Advanced Settings are not accessible from tmsh. You will need to use REST or the UI.

    Example:

    curl -sku admin:admin https://${bigip_mgmt}/mgmt/tm/asm/advanced-settings?\$filter=name%20eq%20"total_xml_memory" | jq .
    
    {
      "kind": "tm:asm:advanced-settings:advanced-settingcollectionstate",
      "selfLink": "https://localhost/mgmt/tm/asm/advanced-settings?ver=13.1.0&$filter=name%20eq%20total_xml_memory",
      "totalItems": 1,
      "items": [
        {
          "value": 0,
          "isUserDefined": false,
          "maxValue": 1073741824,
          "name": "total_xml_memory",
          "lastUpdateMicros": 1528371962000000,
          "kind": "tm:asm:advanced-settings:advanced-settingstate",
          "selfLink": "https://localhost/mgmt/tm/asm/advanced-settings/O6z_jDkjBalpmAiwURU9HQ?ver=13.1.0",
          "minValue": 0,
          "format": "integer",
          "id": "O6z_jDkjBalpmAiwURU9HQ",
          "defaultValue": 0,
          "units": "Bytes"
        }
      ]
    }
    
    

    The logging is different and can be accessed via the specific profile or all profiles.

     
     tmsh list security log profile Guarantee_Log_Profile application { /Common/Guarantee_Log_Profile { guarantee-logging } }
    
    security log profile Guarantee_Log_Profile {
        application {
            Guarantee_Log_Profile {
                guarantee-logging enabled
            }
        }
    }
    
    

    Does this cover what you are looking for?

  • Adding reply to the answers section.

    The settings for ASM Advanced Settings are not accessible from tmsh. You will need to use REST or the UI.

    Example:

    curl -sku admin:admin https://${bigip_mgmt}/mgmt/tm/asm/advanced-settings?\$filter=name%20eq%20"total_xml_memory" | jq .
    
    {
      "kind": "tm:asm:advanced-settings:advanced-settingcollectionstate",
      "selfLink": "https://localhost/mgmt/tm/asm/advanced-settings?ver=13.1.0&$filter=name%20eq%20total_xml_memory",
      "totalItems": 1,
      "items": [
        {
          "value": 0,
          "isUserDefined": false,
          "maxValue": 1073741824,
          "name": "total_xml_memory",
          "lastUpdateMicros": 1528371962000000,
          "kind": "tm:asm:advanced-settings:advanced-settingstate",
          "selfLink": "https://localhost/mgmt/tm/asm/advanced-settings/O6z_jDkjBalpmAiwURU9HQ?ver=13.1.0",
          "minValue": 0,
          "format": "integer",
          "id": "O6z_jDkjBalpmAiwURU9HQ",
          "defaultValue": 0,
          "units": "Bytes"
        }
      ]
    }
    
    `
    
    
    The logging is different and can be accessed via the specific profile or all profiles.
    
    
    ` 
     tmsh list security log profile Guarantee_Log_Profile application { /Common/Guarantee_Log_Profile { guarantee-logging } }
    
    security log profile Guarantee_Log_Profile {
        application {
            Guarantee_Log_Profile {
                guarantee-logging enabled
            }
        }
    }