Is there any way to post custom time stamp to New Relic?

Is there any way to post custom time stamp to newrelic? I am using integration.yml file and command api to run shell script command to post the event metrics . I am able to post the data with in 24 hours range but I am looking for 48 hours range. Any help would be appreciated

Hi, @arcotnagaraja: As noted in the documentation:

The timestamp attribute takes a 64-bit integer Unix timestamp within the last 24 hours.

If you want to record an older time, you may use an attribute name other than timestamp, but you will not be able to use it for TIMESERIES charts.

HI philweber,

Thanks for the reply.
But with the file api like as below intenrations.yml file , i am able to post the time with in 48 hours range. but I am looking same functionality using command api. Any help would be appreciated.

my Yaml file:

integrations:

  • name: nri-flex
    interval: 24h
    timeout: 30s
    config:
    name: sampleEvents
    apis:
    - name: sample
    file: /path/to/sample.csv
    to_lower: true
    rename_keys:
    ^timestamp$: timestamp1
    ^timestamp_derived$: timestamp
    remove_keys:
    - timestamp1
    timestamp_conversion:
    timestamp: TIMESTAMP

Is there any way to post custom time stamp to newrelic? I am using integration.yml file and command api to run shell script command to post the event metrics . With “file api” like below i am able to post custom timestamp with in 48 hours. With “command api”, I am able to post the timestamp with in 24 hours range. I am looking for solution to post the timestamp with in 48 hours using command api . Any suggestions please.

integration.yml with file api:

integrations:

  • name: nri-flex
    config:
    name: sample
    apis:
    - name: sample
    file: /path/to/sample.csv
    to_lower: true
    rename_keys:
    ^timestamp$: timestamp1
    ^timestamp_derived$: timestamp
    remove_keys:
    - timestamp1
    timestamp_conversion:
    timestamp: TIMESTAMP

Hey @arcotnagaraja and @nagaraja.arcot -

To further Clarify what @pweber is saying - it is not possible to post a customer value to the timestamp field if that value is greater than 24 hours old.

If you need to post time data that is older than 24 hours, you can use a custom attribute, but you’ll need to name that attribute something else. You can then query against that custom attribute. That’s the best workaround that is available right now.

Please let me know if that does not clear things up.