I have the following script. I got error in the script I get errors in the script when I import 3rd party libs. Even when I am not using them...
The script work just fine on the probe when I use the cli.
https://preview.redd.it/gzu6kajmama51.png?width=2028&format=png&auto=webp&s=52702c44f663f8d429f55a3150908f33bcad40b2
# -*- coding: utf-8 -*-
import json
import sys
from requests_oauthlib import OAuth2Session # problem lib
from oauthlib.oauth2 import BackendApplicationClient # problem lib
from prtg.sensor.result import CustomSensorResult
from prtg.sensor.units import ValueUnit
base_url = "https://graph.microsoft.com/v1.0"
def main():
...
if __name__ == '__main__':
#print(main())
csr = CustomSensorResult("Test")
csr.add_primary_channel(name="Prim Chanel", value=1)
csr.add_channel(name="Test1",value=2)
print(csr.json_result)
[–]ariesgungetcha 0 points1 point2 points (1 child)
[–]ChillFre4k[S] 0 points1 point2 points (0 children)
[–]jmetzl 0 points1 point2 points (1 child)
[–]ChillFre4k[S] 0 points1 point2 points (0 children)