PureStorage-OpenConnect / pure-fb-openmetrics-exporter

Pure Storage OpenMetrics exporter for FlashBlade
Apache License 2.0
13 stars 10 forks source link

Alert 1124 Not Parsing Correctly #81

Closed james-laing closed 3 weeks ago

james-laing commented 2 months ago

Description Alert 1124 is not reported correctly by the exporter

Expected Result Severity and other cardinalities to report correct state.

Actual result The following cardinalities are incorrect:

purefb_alerts_open
   {
    action="Please verify that the DNS configuration on FlashBlade is correct and that there is no network outage that impacts DNS availability. If this issue persists when DNS is properly configured and available, please contact the group(s) that administer the DNS name servers to ensure that the domain has not had its service records removed unintentionally.", 
    code="Attempting to verify resolution of the issue or checking its status may be done by logging in to FlashBlade and testing the Active Directory configuration. This is possible via ssh and the command line interface, the web UI, or the REST APIs.", 
component_name="Pure Storage Support is not notified of this alert. If you would like assistance from our support team, you can open a case by emailing support@purestorage.com.", 
    component_type="1124", 
    created="fbe", 
    env="CPOC", 
    instance="sv16-fbe-b04-01", 
    job="purefb_openmentrics_array_sv16-fbe-b04-01", 
    kburl="active-directory", 
    location="sg", 
    severity="1722451113718", 
    site="Pure Office", 
    summary="https://support.purestorage.com/?cid=Alert_1124"
   }

Further Details Below is the capture from the OME and REST API for comparison. Purity 4.3.4 FB //E

curl -H 'Authorization: Bearer T-xxxxxx' -X GET 'http://10.23.37.21:32047/metrics/array?endpoint=10.23.37.50' -s | grep ^purefb_info
purefb_info{array_name="sv16-fbe-b04-01",os="Purity//FB",system_id="10c6ce98-51ad-41e1-9e16-f9586a3ba934",version="4.3.4"} 1
curl -s -k -H 'Content-Type: application/json' -H "x-auth-token: ${auth_token}" -X GET https://${endpoint}/api/${api_ver}/arrays | jq .
{
  "continuation_token": null,
  "total_item_count": 1,
  "items": [
    {
      "name": "sv16-fbe-b04-01",
      "id": "10c6ce98-51ad-41e1-9e16-f9586a3ba934",
      "os": "Purity//FB",
      "revision": "08885135",
      "version": "4.3.4",
      "time_zone": "US/Pacific",
      "banner": null,
      "idle_timeout": 0,
      "ntp_servers": [
        "time1.purestorage.com",
        "time2.purestorage.com",
        "time3.purestorage.com"
      ],
      "smb_mode": "native",
      "product_type": "FlashBlade//E",
      "eradication_config": {
        "manual_eradication": "all-enabled",
        "eradication_delay": 86400000
      },
      "security_update": null,
      "encryption": {
        "data_at_rest": {
          "algorithms": [
            "AES-256-XTS"
          ],
          "entropy_source": "rdseed",
          "enabled": true
        }
      },
      "_as_of": 1724238217371
    }
  ]
}
curl -H 'Authorization: Bearer T-xxxxx' -X GET 'http://10.23.37.21:32047/metrics/array?endpoint=10.23.37.50' -s | grep ^purefb_alerts
purefb_alerts_open{action="Please change the user pureuser's password now. Pure Storage Support is not notified of this alert. If you would like assistance from our support team, you can open a case by emailing support@purestorage.com.",code="1123",component_name="pureuser",component_type="security",created="1684876704463",kburl="https://support.purestorage.com/?cid=Alert_1123",severity="warning",summary="Insecure Default pureuser Password"} 1
purefb_alerts_open{action="Please verify that the DNS configuration on FlashBlade is correct and that there is no network outage that impacts DNS availability. If this issue persists when DNS is properly configured and available, please contact the group(s) that administer the DNS name servers to ensure that the domain has not had its service records removed unintentionally.",code="Attempting to verify resolution of the issue or checking its status may be done by logging in to FlashBlade and testing the Active Directory configuration. This is possible via ssh and the command line interface, the web UI, or the REST APIs.",component_name="Pure Storage Support is not notified of this alert. If you would like assistance from our support team, you can open a case by emailing support@purestorage.com.",component_type="1124",created="fbe",kburl="active-directory",severity="1722451113718",summary="https://support.purestorage.com/?cid=Alert_1124"} 1
curl -s -k -H 'Content-Type: application/json' -H "x-auth-token: ${auth_token}" -X GET https://${endpoint}/api/${api_ver}/alerts\?filter=state%3D%27open%27 | jq .
{
  "continuation_token": null,
  "total_item_count": 2,
  "items": [
    {
      "name": "2",
      "index": 2,
      "flagged": false,
      "code": 1123,
      "severity": "warning",
      "component_name": "pureuser",
      "component_type": "security",
      "state": "open",
      "created": 1684876704463,
      "updated": 1724237705212,
      "notified": 1724200178170,
      "summary": "Insecure Default pureuser Password",
      "description": "The user pureuser is configured with the default password. There will be notifications weekly.",
      "knowledge_base_url": "https://support.purestorage.com/?cid=Alert_1123",
      "action": "Please change the user pureuser's password now. Pure Storage Support is not notified of this alert. If you would like assistance from our support team, you can open a case by emailing support@purestorage.com.",
      "variables": {},
      "id": "e6a68ad8-7a59-b326-72e0-eabef1488cb7"
    },
    {
      "name": "819",
      "index": 819,
      "flagged": false,
      "code": 1124,
      "severity": "warning",
      "component_name": "fbe",
      "component_type": "active-directory",
      "state": "open",
      "created": 1722451113718,
      "updated": 1724237785243,
      "notified": 1722971236529,
      "summary": "An active directory configuration (fbe) in domain poc.local is unhealthy and requires attention",
      "description": "Health checks for the Active Directory configuration fbe, which corresponds to the computer fbe in the poc.local domain, have failed.  Clients attempting to mount and perform file operations over any version of the nfs or smb protocol may be impacted.\nA health check failed while discovering directory servers for the domain in DNS. The failure occurred while querying dns for _ldap._tcp.dc._msdcs.poc.local.\nUnable to discover directory servers for the domain using the configured DNS domain and nameservers.\nThis may be the result of a network disruption or DNS misconfiguration, and can impair communication with the domain that is needed to authenticate and authorize clients.\nThere will be daily notifications for 7 days.",
      "knowledge_base_url": "https://support.purestorage.com/?cid=Alert_1124",
      "action": "Please verify that the DNS configuration on FlashBlade is correct and that there is no network outage that impacts DNS availability. If this issue persists when DNS is properly configured and available, please contact the group(s) that administer the DNS name servers to ensure that the domain has not had its service records removed unintentionally.\nAttempting to verify resolution of the issue or checking its status may be done by logging in to FlashBlade and testing the Active Directory configuration. This is possible via ssh and the command line interface, the web UI, or the REST APIs.\nPure Storage Support is not notified of this alert. If you would like assistance from our support team, you can open a case by emailing support@purestorage.com.",
      "variables": {
        "computer_name": "fbe",
        "domain": "poc.local",
        "name": "fbe",
        "failed_test_stages": "dns-directory-server-discovery",
        "id": "34c8ec8c-c1e9-4327-984f-0be19eaef051"
      },
      "id": "c6f576f7-11f9-7865-ec31-6af507632d65"
    }
  ]
}
github-actions[bot] commented 3 weeks ago

Stale issue message