Hello,
I have been using this module for several years now, to record a deployment in New Relic
https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/monitoring/newrelic_deployment.py
I now see on the New Relic website that a variable called ‘timestamp’ can now be used to record the date/time in the past. Which is very useful.
See this as an example https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/record-monitor-deployments#api.
curl -X POST "https://api.newrelic.com/v2/applications//deployments.json" \
-H "X-Api-Key:" \
-i \
-H "Content-Type: application/json" \
-d \
'{
"deployment": {
"revision": "",
"changelog": "",
"description": "",
"user": "",
"timestamp": ""
}
}'
however, after editing the below file to include the timestamp variable and then run my Ansible Playbook, the timestamp in New Relic is the current date/time (13th January) the API POSTed the request, even though the timestamp variable was for January 1st 2020.
/usr/lib/python2.7/site-packages/ansible/modules/monitoring/newrelic_deployment.py
#!/usr/bin/python