[ZBXNEXT-5164] We need a macro that returns unixtime, to use in HTTP item request/header Created: 2019 Apr 03  Updated: 2023 Sep 11

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F), Server (S)
Affects Version/s: None
Fix Version/s: None

Type: Change Request Priority: Critical
Reporter: akihiro ito Assignee: Valdis Murzins
Resolution: Unresolved Votes: 11
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates ZBXNEXT-81 It will be good to implement support ... Open

 Description   

I would like to monitor AWS using HTTP agent items.

A get request to AWS requires the "StartTime" :, "EndTime": parameters.

https://docs.aws.amazon.com/ja_jp/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html

 

Macros can be used for the Request body parameter of the HTTP agent.
However, there is currently no macro in Zabbix that returns Unixtime.

In order to make a request to AWS periodically with HTTP agent, it is necessary to specify the data period to be acquired by Unixtime, not fixed Request body.

Future or past of specified number of seconds
And I need a macro that returns Unixtime for the current time.



 Comments   
Comment by Alexei Vladishev [ 2022 Jul 13 ]

Note that function fmttime() can be used to format output of {TIME} and {DATE}.

Generated at Sat Apr 27 06:18:28 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.