You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to setup a condition based upon tags in order to trigger the webhook when needed. The problem is that the request gets ignored or it doesn't send it to my endpoint.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to setup a condition based upon tags in order to trigger the webhook when needed. The problem is that the request gets ignored or it doesn't send it to my endpoint.
This is my condition:
{"and": [ { "attr": "tags.name" , "value": "backup" , "negate": false }, { "attr": "primary_ip" , "value": "" , "negate": true}]}
I am trying to filter out request whose tags are "backup" and a valid IP Address.
My json payload looks like this:
{ "event":"updated", "timestamp":"2022-10-20 13:54:09.082546+00:00", "model":"device", "username":"chacongj", "request_id":"241bc020-81ce-41da-b54d-bd49040efe89", "data":{ "id":3125, "url":"/api/dcim/devices/3125/", "display":"TEST_DEVICE_NAME", "name":"TEST_DEVICE_NAME", "device_type":{ "id":38, "url":"/api/dcim/device-types/38/", "display":"FortiGate", "manufacturer":{ "id":10, "url":"/api/dcim/manufacturers/10/", "display":"Fortinet", "name":"Fortinet", "slug":"fortinet" }, "model":"FortiGate", "slug":"fortigate" }, "device_role":{ "id":6, "url":"/api/dcim/device-roles/6/", "display":"Firewall", "name":"Firewall", "slug":"firewall" }, "tenant":null, "platform":{ "id":9, "url":"/api/dcim/platforms/9/", "display":"FortiOS", "name":"FortiOS", "slug":"fortios" }, "serial":"14820817", "asset_tag":null, "site":{ "id":44, "url":"/api/dcim/sites/44/", "display":"BCN", "name":"BCN", "slug":"BCN" }, "location":{ "id":81, "url":"/api/dcim/locations/81/", "display":"Bcn Racks", "name":"Bcn Racks", "slug":"Bcn-racks", "_depth":0 }, "rack":{ "id":977, "url":"/api/dcim/racks/977/", "display":"Rack 2", "name":"Rack 2" }, "position":32.0, "face":{ "value":"front", "label":"Front" }, "parent_device":null, "status":{ "value":"active", "label":"Active" }, "airflow":null, "primary_ip":{ "id":111432, "url":"/api/ipam/ip-addresses/111432/", "display":"192.168.28.15/24", "family":4, "address":"192.168.28.15/24" }, "primary_ip4":{ "id":111432, "url":"/api/ipam/ip-addresses/111432/", "display":"192.168.28.15/24", "family":4, "address":"192.168.28.15/24" }, "primary_ip6":null, "cluster":null, "virtual_chassis":null, "vc_position":null, "vc_priority":null, "comments":"", "local_context_data":null, "tags":[ { "id":21, "url":"/api/extras/tags/21/", "display":"backup", "name":"backup", "slug":"backup", "color":"111111" } ], "custom_fields":{ "Ecosystem":"a", "Environment":"a", "Link_to_SW_System":null, "Lucidchart":null, "OS Version":"v6.2.10 build1263 (GA)", "System":"sl,", "avd_id":null, "bgp_asn":null, "networkservicetags":null, "sub_system":"a2" }, "created":"2021-09-17T00:00:00Z", "last_updated":"2022-10-20T13:53:46.123811Z" }, "snapshots":{ "prechange":{ "created":"2021-09-17T00:00:00Z", "last_updated":"2022-10-20T13:53:46.123Z", "local_context_data":null, "device_type":38, "device_role":6, "tenant":null, "platform":9, "name":"TEST_DEVICE_NAME", "serial":"820817", "asset_tag":null, "site":44, "location":81, "rack":977, "position":"32.0", "face":"front", "status":"active", "airflow":"", "primary_ip4":111432, "primary_ip6":null, "cluster":null, "virtual_chassis":null, "vc_position":null, "vc_priority":null, "comments":"", "custom_fields":{ "System":"sl,", "avd_id":null, "bgp_asn":null, "Ecosystem":"a", "Lucidchart":null, "OS Version":"v6.2.10 build1263 (GA)", "sub_system":"a2", "Environment":"a", "Link_to_SW_System":null, "networkservicetags":null }, "tags":[ "backup" ] }, "postchange":null } }
Do you have any suggestion?
Beta Was this translation helpful? Give feedback.
All reactions