if [[ $? = 0 ]]; then
  NAGIOS_CODE=0
  NAGIOS_MESSAGE="OK"
else
  NAGIOS_CODE=2
  NAGIOS_MESSAGE="CRITICAL"
fi

printf "<%= @fqdn -%>\t<%= @service_description -%>\t${NAGIOS_CODE}\t${NAGIOS_MESSAGE}\n" | /usr/sbin/send_nsca -H alert.cluster >/dev/null

if [[ $? = 0 ]]; then
  NAGIOS_CODE=0
  NAGIOS_MESSAGE="OK: Duplicity backup was successful"
else
  NAGIOS_CODE=2
  NAGIOS_MESSAGE="CRITICAL: Duplicity backup failed, non-zero exit code"
fi

printf "<%= @fqdn -%>\t<%= @service_description -%>\t${NAGIOS_CODE}\t${NAGIOS_MESSAGE}\n" | /usr/sbin/send_nsca -H alert.cluster >/dev/null

Add more info to duplicity passive alert
Add more info to duplicity passive alert

Per: https://nagios-plugins.org/doc/guidelines.html#PLUGOUTPUT
