This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def send_to_mattermost(mm_url, mm_channel, mm_username, redis_id, redis_data): | |
_text = {'@timestamp': get_now_iso(), | |
'epoch': int(get_epoch()), | |
"condid": int(redis_data.get(b'condid').decode()), | |
"condname": redis_data.get(b'condname').decode(), | |
"conddesc": redis_data.get(b'conddesc').decode(), | |
"msgid": int(redis_data.get(b'msgid').decode()), | |
"msgtext": redis_data.get(b'msgtext').decode(), | |
"appid": int(redis_data.get(b'appid').decode()), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
_LOGFILE=/home/genesys/.@/$0.log | |
_NOW=$(date +"%Y-%m-%d %H:%M:%S.%6N") | |
_EPOCH=$(date +"%s.%6N") | |
_NOW_UTC=$(date --utc +%FT%T.%6N%Z) | |
_MSG="test message @ $_NOW_UTC" | |
_LOG="$(printf '{"timestamp": "%s", "epoch": "%s", "timestamp_utc": "%s", "message": "%s"}' "${_NOW}" "${_EPOCH}" "${_NOW_UTC}" "${_MSG}")" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat my.har | jq 'del(.log.entries[].response.content.text)' | jq 'del(.log.entries[].request.headers[])' |
OlderNewer