cdillc.splunk.reltime_to_sec filter – convert a relative time expression into a number of seconds
Note
This filter plugin is part of the cdillc.splunk collection (version 0.26.1).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install cdillc.splunk
.
To use it in a playbook, specify: cdillc.splunk.reltime_to_sec
.
New in cdillc.splunk 0.16
Synopsis
Convert a human friendly time span as an number of seconds (integer)
Input
This describes the input of the filter, the value before | cdillc.splunk.reltime_to_sec
.
Parameter |
Comments |
---|---|
Relative time expression Supported suffixes include: |
Notes
Note
Only a subset of Splunk’s relative time syntax is supported.
Many simple expressions like
7d
7 days, and5m
5 mins, should just work.
Examples
# Generate indexes.conf
frozenTimePeriodInSecs = {{ "7d" | cdillc.splunk.reltime_to_sec }}
Return Value
Key |
Description |
---|---|
Number of seconds represented by the given relative-time expression Returned: success |
Hint
Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.