-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connection error #63
Comments
I tried with Curl data : { Results |
@Greg-13 did you ever figure this out? I'm stuck at the same place. |
Hi, we are having the same issue with Zabbix 4.2 :( |
I resolved it using Invoke-RestMethod instead of Invoke-WebRequest, and now api "understand" my json. (powershell code) |
Hi,
I am sorry to bother you with that, but since we upgraded our zabbix (zabbix 3 to 3.2), we got the following error :
Error connection Zabbix :("Error -32700: Parse error, Invalid JSON. An error occurred on the server while parsing the JSON text. while sending {'params': {'password': 'MyPASS', 'user': 'MyUserZabbixAPI'}, 'jsonrpc': '2.0', 'method': 'user.login', 'id': '1'}", -32700)
Function :
def pyzabbix(alarme,valeur):
try:
# Create ZabbixAPI class instance
zapi = ZabbixAPI(url='https://My-zabbix.server/', user='MyUserZabbixAPI', password='MyPASS')
zapi.api_version()
print zapi
# Send metrics to zabbix trapper
packet = [
ZabbixMetric('MyHost', alarme, valeur)
]
result = ZabbixSender(use_config=True).send(packet)
print result
except Exception as e:
print "Error connection Zabbix :" + str(e)
Do you have an idea ?
Thank you ! 👍
The text was updated successfully, but these errors were encountered: