# Data Streams Tasks
# Custom Tasks
# An example of collecting information from the system
The following task example executes the cat /proc/cpuinfo
command on the Agent and feeds the output in a JSON object source.value
to MONQ.
jobs:
- steps:
- run: cat /proc/cpuinfo
outputs:
data: $._outputs.shell
artifacts:
- data: '{ "value": "{{ outputs.data }}" }'
send-to:
api:
uri: https://{YOUR-GLOBAL-DOMAIN}/api/public/cl/v1/stream-data
headers:
x-smon-stream-key: $.vars.stream.key
x-smon-userspace-id: $.userspaceId
media-type: application/json
Other tools can be used this way, such as curl
, grep
, awk
, etc...