| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | # This file is part of the rsyslog project, released under ASL 2.0 |
| 3 | |
| 4 | . ${srcdir:=.}/diag.sh init |
| 5 | |
| 6 | require_plugin "omazuredce" |
| 7 | |
| 8 | generate_conf |
| 9 | add_conf ' |
| 10 | global(processInternalMessages="on" internalmsg.severity="info") |
| 11 | |
| 12 | module(load="../plugins/omazuredce/.libs/omazuredce") |
| 13 | |
| 14 | template(name="tplAzureDceNoDcrId" type="list" option.jsonftree="on") { |
| 15 | property(outname="TimeGenerated" name="timereported" dateFormat="rfc3339" format="jsonf") |
| 16 | property(outname="host" name="hostname" format="jsonf") |
| 17 | property(outname="message" name="msg" format="jsonf") |
| 18 | } |
| 19 | |
| 20 | local4.* action( |
| 21 | type="omazuredce" |
| 22 | template="tplAzureDceNoDcrId" |
| 23 | client_id="dummy-client-id" |
| 24 | client_secret=`echo dummy-client-secret` |
| 25 | tenant_id="dummy-tenant-id" |
| 26 | dce_url="https://example.com" |
| 27 | table_name="Custom-Test_CL" |
| 28 | ) |
| 29 | |
| 30 | action(type="omfile" file="'$RSYSLOG_OUT_LOG'") |
| 31 | ' |
| 32 | |
| 33 | startup |
| 34 | shutdown_when_empty |
| 35 | wait_shutdown |
| 36 | |
| 37 | content_check "omazuredce: parameter 'dcr_id' required but not specified" |
| 38 | |
| 39 | exit_test |