Skip to content

Problems to handover a none json string #702

@StephanHarrer

Description

@StephanHarrer

Hello,

I have to handly a webhook from a network system where the content is not json like. Here a example:

date=2024-10-12 time=23:52:08 devid="FGVMEV-CTZXP2_8F" devname="FGVMEV-CTZXP2_8F" eventtime=1728769927878132716 tz="+0200" logid="0100026001" type="event" subtype="system" level="information" vd="root" logdesc="DHCP Ack log" interface="port2" dhcp_msg="Ack" mac="00:XC:29:F4:XX:XX" ip=10.98.0.2 lease=300 hostname="CL" msg="DHCP server sends a DHCPACK"

As far as I see the content is not well json formated.

webhook tells me:
[webhook] 2024/10/13 00:30:51 [20b296] 200 | 0 B | 104.629µs | 10.5.5.5 | POST /hooks/FS
[webhook] 2024/10/13 00:30:51 [20b296] error extracting command arguments: couldn't retrieve argument for {Source:payload Name: EnvName: Base64Decode:false}
[webhook] 2024/10/13 00:30:51 [20b296] executing /tmp/test.py (/tmp/test.py) with arguments ["/tmp/test.py" ""] and environment [] using /tmp as cwd
[webhook] 2024/10/13 00:30:51 [20b296] command output:

My question how can I tell webhook to do NOT parse the content as json and handover the string (content) to my python program?

Regards
Stephan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions