Skip to content

Instantly share code, notes, and snippets.

@vmanyushin
Created February 20, 2019 22:27
Show Gist options
  • Save vmanyushin/f197ec3868fd50dfce381fca34ec153f to your computer and use it in GitHub Desktop.
Save vmanyushin/f197ec3868fd50dfce381fca34ec153f to your computer and use it in GitHub Desktop.
send values to zabbix without sender
#!/bin/bash
# ver 0.1
# emulate zabbix_sender -z zabbix -s eol.lan -k systemd.abandoned -v 35
ZBX=zabbix.lan
NUM=$(echo -n "35" | perl -e 'foreach$c(split(//,<STDIN>)){printf"%x",ord($c);}')
echo -n "5a425844015c000000000000007b2272657175657374223a2273656e6465722064617461222c2264617461223a5b7b22686f7374223a22656f6c2e6c616e222c226b6579223a2273797374656d642e6162616e646f6e6564222c2276616c7565223a22${NUM}227d5d7d" | xxd -r -p | nc $ZBX 10051
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment