Skip to content

Commit

Permalink
fix enum. remove 1 metric
Browse files Browse the repository at this point in the history
  • Loading branch information
Koos85 committed Sep 12, 2023
1 parent ca6f3b6 commit 49381e2
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions lib/check/hypervguest.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,23 +99,13 @@
}

OPERATIONAL_STATUS_MORE = {
0: 'Unknown',
1: 'Not Available',
2: 'Servicing',
3: 'Starting',
4: 'Stopping',
5: 'Stopped',
6: 'Aborted',
7: 'Dormant',
8: 'Completed',
9: 'Migrating',
10: 'Emigrating',
11: 'Immigrating',
12: 'Snapshotting',
13: 'Shutting Down',
14: 'In Test',
15: 'Transitioning',
16: 'In Service',
32768: 'Creating Snapshot',
32769: 'Applying Snapshot',
32770: 'Deleting Snapshot',
32771: 'Waiting to Start',
32772: 'Merging Disks',
32773: 'Exporting Virtual Machine',
32774: 'Migrating Virtual Machine',
}

PRIMARY_STATUS = {
Expand Down Expand Up @@ -183,7 +173,7 @@ async def check_hypervguest(
OperationalStatus, Status, HealthState,
CommunicationStatus, DetailedStatus, OperatingStatus,
PrimaryStatus, EnabledState, OtherEnabledState, RequestedState,
EnabledDefault, TimeOfLastStateChange, CreationClassName,
EnabledDefault, TimeOfLastStateChange,
NameFormat, PrimaryOwnerName, PrimaryOwnerContact,
OnTimeInMilliseconds,ProcessID, TimeOfLastConfigurationChange,
NumberOfNumaNodes, ReplicationState, ReplicationHealth,
Expand Down Expand Up @@ -237,7 +227,6 @@ async def check_hypervguest(
row['LastSuccessfulBackupTime'] = \
parse_wmi_date(row['LastSuccessfulBackupTime'])


return {
TYPE_NAME: rows
}

0 comments on commit 49381e2

Please sign in to comment.