cdillc.splunk.reltime_to_sec (0.26.1) — filter

convert a relative time expression into a number of seconds

| "added in version" 0.16 of cdillc.splunk"

Authors: unknown

Install collection

Install with ansible-galaxy collection install cdillc.splunk:==0.26.1


Add to requirements.yml

  collections:
    - name: cdillc.splunk
      version: 0.26.1

Description

Convert a human friendly time span as an number of seconds (integer)

Inputs

    
_input:
    description:
    - Relative time expression
    - 'Supported suffixes include: C(y) years, C(mon) months, C(w) weeks, C(d) days, C(h)
      hours, C(m) minutes, and (s) seconds.'
    required: true
    type: str

Outputs

_value:
  description: Number of seconds represented by the given relative-time expression
  type: int