Skip to content

Commit

Permalink
guid
Browse files Browse the repository at this point in the history
  • Loading branch information
Koos85 committed Sep 12, 2023
1 parent edde14f commit 379727f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ asset:
check: "hypervguest"
config:
address: "192.168.1.2"
guuid: "342934292923129393"
guid: "01234567-0123-0123-0123-0123456789AB"
```
Run the probe with the `DRY_RUN` environment variable set the the yaml file above.
Expand Down
8 changes: 4 additions & 4 deletions lib/check/hypervguest.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ async def check_hypervguest(
config: dict) -> dict:
conn, service = await wmiconn(asset, asset_config, config)

guuid = config.get('guuid')
if guuid is None:
logging.error(f'missing guuid for {asset}')
guid = config.get('guid')
if guid is None:
logging.error(f'missing guid for {asset}')
raise IgnoreResultException
query = Query(f"""
SELECT
Expand All @@ -180,7 +180,7 @@ async def check_hypervguest(
LastApplicationConsistentReplicationTime, LastReplicationTime,
LastSuccessfulBackupTime, EnhancedSessionModeState,
HwThreadsPerCoreRealized
FROM Msvm_ComputerSystem WHERE Name = '{guuid}'
FROM Msvm_ComputerSystem WHERE Name = '{guid}'
""", namespace=r'root\virtualization\v2')
try:
rows = await wmiquery(conn, service, query)
Expand Down

0 comments on commit 379727f

Please sign in to comment.