Skip to content

Commit

Permalink
address -> hypervisor
Browse files Browse the repository at this point in the history
  • Loading branch information
Koos85 committed Sep 12, 2023
1 parent 379727f commit 8c7e237
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ asset:
name: "foo.local"
check: "hypervguest"
config:
address: "192.168.1.2"
hypervisor: "192.168.1.2"
guid: "01234567-0123-0123-0123-0123456789AB"
```
Expand Down
9 changes: 5 additions & 4 deletions lib/wmiquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ async def wmiconn(
asset: Asset,
asset_config: dict,
check_config: dict) -> Tuple[Connection, Service]:
address = check_config.get('address')
if not address:
address = asset.name
hypervisor = check_config.get('hypervisor')
if hypervisor is None:
msg = 'missing hypervisor in collector configuration'
raise CheckException(msg)
username = asset_config.get('username')
password = asset_config.get('password')
if None in (username, password):
Expand All @@ -44,7 +45,7 @@ async def wmiconn(
else:
domain = ''

conn = Connection(address, username, password, domain)
conn = Connection(hypervisor, username, password, domain)
service = None

try:
Expand Down

0 comments on commit 8c7e237

Please sign in to comment.