Megosztás a következőn keresztül:


Operációs rendszer nélküli géppel kapcsolatos problémák elhárítása a az networkcloud baremetalmachine run-data-extract parancs használatával

Előfordulhatnak olyan helyzetek, amikor a felhasználónak ki kell vizsgálnia és meg kell oldania a helyszíni operációs rendszer nélküli gépekkel kapcsolatos problémákat. Az Azure Operator Nexus egy előírt adatkivonat-parancskészletet biztosít a következőn keresztül az networkcloud baremetalmachine run-data-extract: . Ezek a parancsok lehetővé teszik a felhasználók számára, hogy diagnosztikai adatokat kérjenek le egy operációs rendszer nélküli gépről.

A parancs létrehoz egy kimeneti fájlt, amely a Fürtkezelő Azure Storage-fiókjában található adatkivonat eredményeit tartalmazza.

Előfeltételek

  • Ez a cikk feltételezi, hogy telepítette az Azure parancssori felületét és a parancssori felület bővítményét networkcloud . További információ: Parancssori felületi bővítmények telepítése.
  • A cél nélküli fém gép be van kapcsolva, és a readyState értéke True.
  • Ezeknek a parancsoknak a szintaxisa a parancssori felület 0.3.0+-os verzióján az networkcloud alapul.
  • Kérje le a fürterőforráshoz létrehozott fürt felügyelt erőforráscsoportjának nevét (cluster_MRG).

Tárfiók-hozzáférés ellenőrzése

Ellenőrizze, hogy rendelkezik-e hozzáféréssel a Fürtkezelő tárfiókhoz

  1. Az Azure Portalon navigáljon a Cluster Manager Storage-fiókjához.
  2. A Storage-fiók részletei között válassza a Storage böngészőt a bal oldali navigációs menüből.
  3. A Storage böngésző részletei között válassza a Blob-tárolók lehetőséget.
  4. Ha egy 403 This request is not authorized to perform this operation. ideig hozzáfér a tárfiókhoz, a tárfiók tűzfalbeállításainak frissítésére van szükség a nyilvános IP-cím belefoglalásához.
  5. Hozzáférés kérése támogatási jegy létrehozásával a Portalon a Cluster Manager-erőforráson. Adja meg a hozzáférést igénylő nyilvános IP-címet.

Futtatási parancs végrehajtása

A futtatási adatok kinyerése parancs egy vagy több előre definiált szkriptet hajt végre, hogy adatokat nyerjen ki egy operációs rendszer nélküli gépről.

A támogatott parancsok aktuális listája a következő:

A parancs szintaxisa a következő:

az networkcloud baremetalmachine run-data-extract --name "<machine-name>"  \
  --resource-group "<cluster_MRG>" \
  --subscription "<subscription>" \
  --commands '[{"arguments":["<arg1>","<arg2>"],"command":"<command1>"}]'  \
  --limit-time-seconds "<timeout>"

Adjon meg több parancsot json formátumban a beállításban --commands . Mindegyik command parancsot és argumentumot határoz meg. Több argumentumot tartalmazó parancs esetén adja meg listaként a arguments paramétert. A struktúra felépítésére vonatkozó utasításokért tekintse meg az Azure CLI Rövid útmutatóját--commands.

Ezek a parancsok hosszú ideig futhatnak, ezért a javaslatot legalább 600 másodpercre (10 perc) kell beállítani --limit-time-seconds . A Debug beállítás vagy több kivonat futtatása 10 percnél hosszabb időt is igénybe vehet.

A válaszban a művelet aszinkron módon hajt végre, és egy 202-ből álló HTTP-állapotkódot ad vissza. A parancsok befejezésének nyomon követésével és a kimeneti fájl megtekintésével kapcsolatos részletekért tekintse meg a Kimenet szakaszt.

Hardvertámogatási adatgyűjtés

Ez a példa végrehajtja a hardware-support-data-collection parancsot, és lekéri SysInfo és TTYLog naplózza a Dell-kiszolgálóról. A szkript végrehajt egy racadm supportassist collect parancsot a kijelölt baremetal gépen. Az eredményként kapott tar.gz fájl tartalmazza a tömörített kivonat parancsfájljának kimeneteit a fájlban hardware-support-data-<timestamp>.zip.

az networkcloud baremetalmachine run-data-extract --name "bareMetalMachineName" \
  --resource-group "cluster_MRG" \
  --subscription "subscription" \
  --commands '[{"arguments":["SysInfo", "TTYLog"],"command":"hardware-support-data-collection"}]' \
  --limit-time-seconds 600

hardware-support-data-collection Hozam

====Action Command Output====
Executing hardware-support-data-collection command
Getting following hardware support logs: SysInfo,TTYLog
Job JID_814372800396 is running, waiting for it to complete ...
Job JID_814372800396 Completed.
---------------------------- JOB -------------------------
[Job ID=JID_814372800396]
Job Name=SupportAssist Collection
Status=Completed
Scheduled Start Time=[Not Applicable]
Expiration Time=[Not Applicable]
Actual Start Time=[Thu, 13 Apr 2023 20:54:40]
Actual Completion Time=[Thu, 13 Apr 2023 20:59:51]
Message=[SRV088: The SupportAssist Collection Operation is completed successfully.]
Percent Complete=[100]
----------------------------------------------------------
Deleting Job JID_814372800396
Collection successfully exported to /hostfs/tmp/runcommand/hardware-support-data-2023-04-13T21:00:01.zip

================================
Script execution result can be found in storage account:
https://cm2p9bctvhxnst.blob.core.windows.net/bmm-run-command-output/dd84df50-7b02-4d10-a2be-46782cbf4eef-action-bmmdataextcmd.tar.gz?se=2023-04-14T01%3A00%3A15Zandsig=ZJcsNoBzvOkUNL0IQ3XGtbJSaZxYqmtd%2BM6rmxDFqXE%3Dandsp=randspr=httpsandsr=bandst=2023-04-13T21%3A00%3A15Zandsv=2019-12-12

Az összegyűjtött hardvertámogatási fájlok példalistája

Archive:  TSR20240227164024_FM56PK3.pl.zip
   creating: tsr/hardware/
   creating: tsr/hardware/spd/
   creating: tsr/hardware/sysinfo/
   creating: tsr/hardware/sysinfo/inventory/
  inflating: tsr/hardware/sysinfo/inventory/sysinfo_CIM_BIOSAttribute.xml  
  inflating: tsr/hardware/sysinfo/inventory/sysinfo_CIM_Sensor.xml  
  inflating: tsr/hardware/sysinfo/inventory/sysinfo_DCIM_View.xml  
  inflating: tsr/hardware/sysinfo/inventory/sysinfo_DCIM_SoftwareIdentity.xml  
  inflating: tsr/hardware/sysinfo/inventory/sysinfo_CIM_Capabilities.xml  
  inflating: tsr/hardware/sysinfo/inventory/sysinfo_CIM_StatisticalData.xml  
   creating: tsr/hardware/sysinfo/lcfiles/
  inflating: tsr/hardware/sysinfo/lcfiles/lclog_0.xml.gz  
  inflating: tsr/hardware/sysinfo/lcfiles/curr_lclog.xml  
   creating: tsr/hardware/psu/
   creating: tsr/hardware/idracstateinfo/
  inflating: tsr/hardware/idracstateinfo/avc.log  
 extracting: tsr/hardware/idracstateinfo/avc.log.persistent.1  
[..snip..]

MDE-ügynök adatainak gyűjtése

Az adatok gyűjtése a mde-agent-information paranccsal történik, és JSON-ként van formázva./hostfs/tmp/runcommand/mde-agent-information.json A JSON-fájl a tárfiókban található adatkivonat zip-fájljában található. A szkript parancsok sorozatát mdatp hajtja végre a kijelölt baremetális gépen.

Ez a példa argumentumok nélkül hajtja végre a mde-agent-information parancsot.

az networkcloud baremetalmachine run-data-extract --name "bareMetalMachineName" \
  --resource-group "cluster_MRG" \
  --subscription "subscription" \
  --commands '[{"command":"mde-agent-information"}]' \
  --limit-time-seconds 600

mde-agent-information Hozam

====Action Command Output====
Executing mde-agent-information command
MDE agent is running, proceeding with data extract
Getting MDE agent information for bareMetalMachine
Writing to /hostfs/tmp/runcommand

================================
Script execution result can be found in storage account:
 https://cmzhnh6bdsfsdwpbst.blob.core.windows.net/bmm-run-command-output/f5962f18-2228-450b-8cf7-cb8344fdss63b0-action-bmmdataextcmd.tar.gz?se=2023-07-26T19%3A07%3A22Z&sig=X9K3VoNWRFP78OKqFjvYoxubp65BbNTq%2BGnlHclI9Og%3D&sp=r&spr=https&sr=b&st=2023-07-26T15%3A07%3A22Z&sv=2019-12-12

Példa összegyűjtött JSON-objektumra

{
  "diagnosticInformation": {
      "realTimeProtectionStats": $real_time_protection_stats,
      "eventProviderStats": $event_provider_stats
      },
  "mdeDefinitions": $mde_definitions,
  "generalHealth": $general_health,
  "mdeConfiguration": $mde_config,
  "scanList": $scan_list,
  "threatInformation": {
      "list": $threat_info_list,
      "quarantineList": $threat_info_quarantine_list
    }
}

MDE támogatási diagnosztikák gyűjtése

A parancsból mde-support-diagnostics gyűjtött adatok az MDE Ügyfélelemző eszközzel gyűjtik össze a parancsokból és a kapcsolódó naplófájlokból származó mdatp információkat. A tárfiókfájl tgz egy zip mde-support-diagnostics-<hostname>.zip. A zip támogatási kérésekkel együtt el kell küldeni, hogy a támogató csapatok szükség esetén használhassák a naplókat a hibaelhárításhoz és a kiváltó okok elemzéséhez.

Ez a példa argumentumok nélkül hajtja végre a mde-support-diagnostics parancsot.

az networkcloud baremetalmachine run-data-extract --name "bareMetalMachineName" \
  --resource-group "cluster_MRG" \
  --subscription "subscription" \
  --commands '[{"command":"mde-support-diagnostics"}]' \
  --limit-time-seconds 600

mde-support-diagnostics Hozam

====Action Command Output====
Executing mde-support-diagnostics command
[2024-01-23 16:07:37.588][INFO] XMDEClientAnalyzer Version: 1.3.2
[2024-01-23 16:07:38.367][INFO] Top Command output: [/tmp/top_output_2024_01_23_16_07_37mel0nue0.txt]
[2024-01-23 16:07:38.367][INFO] Top Command Summary: [/tmp/top_summary_2024_01_23_16_07_370zh7dkqn.txt]
[2024-01-23 16:07:38.367][INFO] Top Command Outliers: [/tmp/top_outlier_2024_01_23_16_07_37aypcfidh.txt]
[2024-01-23 16:07:38.368][INFO] [MDE Diagnostic]
[2024-01-23 16:07:38.368][INFO]   Collecting MDE Diagnostic
[2024-01-23 16:07:38.613][WARNING] mde is not running
[2024-01-23 16:07:41.343][INFO] [SLEEP] [3sec] waiting for agent to create diagnostic package
[2024-01-23 16:07:44.347][INFO] diagnostic package path: /var/opt/microsoft/mdatp/wdavdiag/5b1edef9-3b2a-45c1-a45d-9e7e4b6b869e.zip
[2024-01-23 16:07:44.347][INFO] Successfully created MDE diagnostic zip
[2024-01-23 16:07:44.348][INFO]   Adding mde_diagnostic.zip to report directory
[2024-01-23 16:07:44.348][INFO]   Collecting MDE Health
[...snip...]
================================
Script execution result can be found in storage account: 
 https://cmmj627vvrzkst.blob.core.windows.net/bmm-run-command-output/7c5557b9-b6b6-a4a4-97ea-752c38918ded-action-bmmdataextcmd.tar.gz?se=2024-01-23T20%3A11%3A32Z&sig=9h20XlZO87J7fCr0S1234xcyu%2Fl%2BVuaDh1BE0J6Yfl8%3D&sp=r&spr=https&sr=b&st=2024-01-23T16%3A11%3A32Z&sv=2019-12-12 

A végrehajtási eredményfájl letöltése után a támogatási fájlok kibonthatók elemzésre.

Példa az MDE ügyfélelemző által gyűjtött információk listájára

Archive:  mde-support-diagnostics-rack1compute02.zip
  inflating: mde_diagnostic.zip      
  inflating: process_information.txt  
  inflating: auditd_info.txt         
  inflating: auditd_log_analysis.txt  
  inflating: auditd_logs.zip         
  inflating: ebpf_kernel_config.txt  
  inflating: ebpf_enabled_func.txt   
  inflating: ebpf_syscalls.zip       
  inflating: ebpf_raw_syscalls.zip   
  inflating: messagess.zip           
  inflating: conflicting_processes_information.txt  
[...snip...]

Hardveres összesítés állapota

Az adatok gyűjtése a hardware-rollup-status paranccsal történik, és JSON-ként van formázva./hostfs/tmp/runcommand/rollupStatus.json A JSON-fájl a tárfiókban található adatkivonat zip-fájljában található. Az összegyűjtött adatok a gép alrendszereinek állapotát jelenítik meg.

Ez a példa argumentumok nélkül hajtja végre a hardware-rollup-status parancsot.

az networkcloud baremetalmachine run-data-extract --name "bareMetalMachineName" \
  --resource-group "clusete_MRG" \
  --subscription "subscription" \
  --commands '[{"command":"hardware-rollup-status"}]' \
  --limit-time-seconds 600

hardware-rollup-status Hozam

====Action Command Output====
Executing hardware-rollup-status command
Getting rollup status logs for b37dev03a1c002
Writing to /hostfs/tmp/runcommand

================================
Script execution result can be found in storage account:
https://cmkfjft8twwpst.blob.core.windows.net/bmm-run-command-output/20b217b5-ea38-4394-9db1-21a0d392eff0-action-bmmdataextcmd.tar.gz?se=2023-09-19T18%3A47%3A17Z&sig=ZJcsNoBzvOkUNL0IQ3XGtbJSaZxYqmtd%3D&sp=r&spr=https&sr=b&st=2023-09-19T14%3A47%3A17Z&sv=2019-12-12

Példa összegyűjtött JSON-ra

{
	"@odata.context" : "/redfish/v1/$metadata#DellRollupStatusCollection.DellRollupStatusCollection",
	"@odata.id" : "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellRollupStatus",
	"@odata.type" : "#DellRollupStatusCollection.DellRollupStatusCollection",
	"Description" : "A collection of DellRollupStatus resource",
	"Members" : 
	[
		{
			"@odata.context" : "/redfish/v1/$metadata#DellRollupStatus.DellRollupStatus",
			"@odata.id" : "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellRollupStatus/iDRAC.Embedded.1_0x23_SubSystem.1_0x23_Current",
			"@odata.type" : "#DellRollupStatus.v1_0_0.DellRollupStatus",
			"CollectionName" : "CurrentRollupStatus",
			"Description" : "Represents the subcomponent roll-up statuses.",
			"Id" : "iDRAC.Embedded.1_0x23_SubSystem.1_0x23_Current",
			"InstanceID" : "iDRAC.Embedded.1#SubSystem.1#Current",
			"Name" : "DellRollupStatus",
			"RollupStatus" : "Ok",
			"SubSystem" : "Current"
		},
		{
			"@odata.context" : "/redfish/v1/$metadata#DellRollupStatus.DellRollupStatus",
			"@odata.id" : "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellRollupStatus/iDRAC.Embedded.1_0x23_SubSystem.1_0x23_Voltage",
			"@odata.type" : "#DellRollupStatus.v1_0_0.DellRollupStatus",
			"CollectionName" : "VoltageRollupStatus",
			"Description" : "Represents the subcomponent roll-up statuses.",
			"Id" : "iDRAC.Embedded.1_0x23_SubSystem.1_0x23_Voltage",
			"InstanceID" : "iDRAC.Embedded.1#SubSystem.1#Voltage",
			"Name" : "DellRollupStatus",
			"RollupStatus" : "Ok",
			"SubSystem" : "Voltage"
		},
[..snip..]

Fürt CVE-jelentésének létrehozása

A biztonságirés-adatok gyűjtése a cluster-cve-report paranccsal történik, és JSON-ként van formázva.{year}-{month}-{day}-nexus-cluster-vulnerability-report.json A JSON-fájl a tárfiókban található adatkivonat zip-fájljában található. Az összegyűjtött adatok a fürt tárolólemezképeként tartalmazzák a biztonságirés-adatokat.

Ez a példa argumentumok nélkül hajtja végre a cluster-cve-report parancsot.

Feljegyzés

A célgépnek vezérlősík-csomópontnak kell lennie, vagy a művelet nem lesz végrehajtva.

az networkcloud baremetalmachine run-data-extract --name "bareMetalMachineName" \
  --resource-group "cluster_MRG" \
  --subscription "subscription" \
  --commands '[{"command":"cluster-cve-report"}]' \
  --limit-time-seconds 600

cluster-cve-report Hozam

====Action Command Output====
Nexus cluster vulnerability report saved.


================================
Script execution result can be found in storage account:
https://cmkfjft8twwpst.blob.core.windows.net/bmm-run-command-output/20b217b5-ea38-4394-9db1-21a0d392eff0-action-bmmdataextcmd.tar.gz?se=2023-09-19T18%3A47%3A17Z&sig=ZJcsNoBzvOkUNL0IQ3XGtbJSaZxYqmtd%3D&sp=r&spr=https&sr=b&st=2023-09-19T14%3A47%3A17Z&sv=2019-12-12

CVE jelentésséma

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Vulnerability Report",
  "type": "object",
  "properties": {
    "metadata": {
      "type": "object",
      "properties": {
        "dateRetrieved": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time when the data was retrieved."
        },
        "platform": {
          "type": "string",
          "description": "The name of the platform."
        },
        "resource": {
          "type": "string",
          "description": "The name of the resource."
        },
        "runtimeVersion": {
          "type": "string",
          "description": "The version of the runtime."
        },
        "managementVersion": {
          "type": "string",
          "description": "The version of the management software."
        },
        "vulnerabilitySummary": {
          "type": "object",
          "properties": {
            "criticalCount": {
              "type": "integer",
              "description": "Number of critical vulnerabilities."
            },
            "highCount": {
              "type": "integer",
              "description": "Number of high severity vulnerabilities."
            },
            "mediumCount": {
              "type": "integer",
              "description": "Number of medium severity vulnerabilities."
            },
            "lowCount": {
              "type": "integer",
              "description": "Number of low severity vulnerabilities."
            },
            "noneCount": {
              "type": "integer",
              "description": "Number of vulnerabilities with no severity."
            },
            "unknownCount": {
              "type": "integer",
              "description": "Number of vulnerabilities with unknown severity."
            }
          },
          "required": ["criticalCount", "highCount", "mediumCount", "lowCount", "noneCount", "unknownCount"]
        }
      },
      "required": ["dateRetrieved", "platform", "resource", "runtimeVersion", "managementVersion", "vulnerabilitySummary"]
    },
    "containers": {
      "type": "object",
      "additionalProperties": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "namespace": {
              "type": "string",
              "description": "The namespace of the container."
            },
            "digest": {
              "type": "string",
              "description": "The digest of the container image."
            },
            "os": {
              "type": "object",
              "properties": {
                "family": {
                  "type": "string",
                  "description": "The family of the operating system."
                }
              },
              "required": ["family"]
            },
            "summary": {
              "type": "object",
              "properties": {
                "criticalCount": {
                  "type": "integer",
                  "description": "Number of critical vulnerabilities in this container."
                },
                "highCount": {
                  "type": "integer",
                  "description": "Number of high severity vulnerabilities in this container."
                },
                "lowCount": {
                  "type": "integer",
                  "description": "Number of low severity vulnerabilities in this container."
                },
                "mediumCount": {
                  "type": "integer",
                  "description": "Number of medium severity vulnerabilities in this container."
                },
                "noneCount": {
                  "type": "integer",
                  "description": "Number of vulnerabilities with no severity in this container."
                },
                "unknownCount": {
                  "type": "integer",
                  "description": "Number of vulnerabilities with unknown severity in this container."
                }
              },
              "required": ["criticalCount", "highCount", "lowCount", "mediumCount", "noneCount", "unknownCount"]
            },
            "vulnerabilities": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Title of the vulnerability."
                  },
                  "vulnerabilityID": {
                    "type": "string",
                    "description": "Identifier of the vulnerability."
                  },
                  "fixedVersion": {
                    "type": "string",
                    "description": "The version in which the vulnerability is fixed."
                  },
                  "installedVersion": {
                    "type": "string",
                    "description": "The currently installed version."
                  },
                  "referenceLink": {
                    "type": "string",
                    "format": "uri",
                    "description": "Link to the vulnerability details."
                  },
                  "publishedDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "The date when the vulnerability was published."
                  },
                  "score": {
                    "type": "number",
                    "description": "The CVSS score of the vulnerability."
                  },
                  "severity": {
                    "type": "string",
                    "description": "The severity level of the vulnerability."
                  },
                  "resource": {
                    "type": "string",
                    "description": "The resource affected by the vulnerability."
                  },
                  "target": {
                    "type": "string",
                    "description": "The target of the vulnerability."
                  },
                  "packageType": {
                    "type": "string",
                    "description": "The type of the package."
                  },
                  "exploitAvailable": {
                    "type": "boolean",
                    "description": "Indicates if an exploit is available for the vulnerability."
                  }
                },
                "required": ["title", "vulnerabilityID", "fixedVersion", "installedVersion", "referenceLink", "publishedDate", "score", "severity", "resource", "target", "packageType", "exploitAvailable"]
              }
            }
          },
          "required": ["namespace", "digest", "os", "summary", "vulnerabilities"]
        }
      }
    }
  },
  "required": ["metadata", "containers"]
}

CVE-adatok részletei

A CVE-adatok tárolórendszerképenként 24 óránként frissülnek a Kubernetes-erőforráspéldány alapján, vagy ha a rendszerképre hivatkozó Kubernetes-erőforrás módosul (amelyik előbb következik be).

A kimenet megtekintése

Jegyezze fel a parancs végrehajtásából származó tar.gz tömörített fájlra mutató hivatkozást. A tar.gz fájlnév azonosítja a fájlt a Fürtkezelő erőforráscsoport tárfiókjában. A hivatkozás segítségével közvetlenül is elérheti a kimeneti zip-fájlt. A tar.gz fájl a tömörített kivonat parancsfájl kimeneteit is tartalmazza. Töltse le a kimeneti fájlt a tárolóblobból egy helyi könyvtárba az opcionális argumentum --output-directorykönyvtárelérési útvonalának megadásával. Megjegyzés: A tárfiók hálózati vagy tűzfalkorlátozások miatt zárolható 403 This request is not authorized to perform this operation. . A hozzáférés ellenőrzéséhez/kéréséhez tekintse meg a Tárfiók hozzáférésének ellenőrzése című témakört.