add env config
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import random
|
||||
import time
|
||||
|
||||
# Read the OID from the environment variable
|
||||
oid = os.getenv('CUSTOM_OID', '.1.3.6.1.4.1.38446.1.2.4.1.9.1')
|
||||
|
||||
# Initial value
|
||||
value = 1385062
|
||||
|
||||
@@ -10,7 +14,7 @@ while True:
|
||||
value += random.randint(0, 6)
|
||||
|
||||
# Output the value in the required format
|
||||
print(f"INTEGER: {value}")
|
||||
print(f"{oid} = INTEGER: {value}")
|
||||
|
||||
# Wait for 4 minutes
|
||||
time.sleep(240)
|
||||
|
||||
Reference in New Issue
Block a user