Skip to content

Neptune Apex plugin - unable to parse "none -0400" #5883

@boozer2

Description

@boozer2

Relevant telegraf.conf:

# Neptune Apex data collector
[[inputs.neptune_apex]]
   ## The Neptune Apex plugin reads the publicly available status.xml data from a local Apex.
   ## Measurements will be logged under "apex".

   ## The base URL of the local Apex(es). If you specify more than one server, they will
   ## be differentiated by the "source" tag.
   servers = [
     "http://192.168.111.111",
   ]

   ## The response_timeout specifies how long to wait for a reply from the Apex.
   #response_timeout = "5s"

System info:

Telegraf 1.10.4
Ubuntu 18.04 Server

Steps to reproduce:

I haven't gotten this to work at all because of this parsing error. This appears to be because the plugin is expecting a date but the Apex is returning "none" for power restored time.

Expected behavior:

No errors, and data logged to InfluxDB

Actual behavior:

Error: telegraf[9919]: 2019-05-21T00:33:50Z E! [inputs.neptune_apex]: Error in plugin: unable to parse "none -0400" (parsing time "none -0400": month out of range)

And nothing is added to my database from this input plugin.

Additional info:

Beginning of my Apex status.xml:

<status software="4.53_AB17" hardware="1.0">
    <hostname>FishTank</hostname>
    <serial>AC4:12345</serial>
    <timezone>-4.00</timezone>
    <date>05/20/2019 20:24:36</date>
    <power>
        <failed>05/06/2019 17:43:41</failed>
        <restored>none</restored>
    </power>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugunexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions