Custos has very powerful ability to monitor events in applications written in almost any language through a very simple REST API.

Events from a Shell Script

This simple example is an example of a script that runs from cron and sends data to Custos in the event of some expected keyword triggers. See the Event API documentation for more details.

#!/bin/bash

log=$(mktemp)

/opt/edoceo/myapp/sbin/cron.php --arg exec >$log 2>&1

if grep -qi -e 'error\|warn\|fatal\|fail' $log
then
	echo "Found Errors"
	cat $log | curl -H 'Content-Type: text/plain' -d@- http://custos.io/api/event?s=ed0ce0727804f69d71000002
fi

rm -f $log

Events from a PHP Script


Events from a Node.JS Script