PRTG API Return 401 : Unauthorized


在使用PRTG的API取回Sensor的資料時,resopnse code為401 : Unauthorized
在瀏覽器上使用API時,因為瀏覽器有登入PRTG,故沒有出現這個問題,但是改以python的requests模組使用api時就出現了這個錯誤的訊息。

回到PRTG管理頁上,在設置 -> 帳戶設定 -> 我的帳戶 ,點選passhash並將值記錄下來,例如passhash值為123456


在使用API時,加上username=prtgadmin&passhash=123456,這樣就可以通過API來認證並取回Sensor的資料

例如:http://192.168.1.131:9090/api/getobjectstatus.htm?id=3312&name=lastvalue&show=text&username=prtgadmin&passhash=123456



ora-38029: object statistics are locked