Ad Widget

Collapse

Zabbix Sender - Removes double quotes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BlizzardTech-Adam
    Junior Member
    • Dec 2021
    • 6

    #1

    Zabbix Sender - Removes double quotes

    Hi,
    I am using Powershell to query some data and bring it back in JSON.
    I then use the Zabbix Sender to send that json over to my Zabbix Server.

    The problem I have is that it removes all the double quotes (") from the string going over meaning it is not true json anymore.

    Is there a way to prevent this?

    My script is PowerShell and is running on Windows 10.
  • BlizzardTech-Adam
    Junior Member
    • Dec 2021
    • 6

    #2
    With the help of isiroshtan on this forum, I was pointed in the right direction for this issue.
    Poweshell has a play in this too and the way I got around this was replacing my json content's " with """"

    By the time this was sent into Zabbix the normal quote's remained.

    The snippet of code that does this - $VMAPI = $VMAPI.replace('"','""""')
    $VMAPI contains the json that was obtained from my API Query.

    I am happy to help anyone who needs assistance though I am not a pro but I did see very little on this around the internet.

    Again, thank you isiroshtan

    My Zabbix version is 4.4 (spinning up a 5.2 soon)
    I also work with version 4 as well.




    Comment

    • nibedita@jena
      Junior Member
      • Mar 2022
      • 6

      #3
      please explain , how can remove double quotation in csv file zabbix

      Comment

      Working...