On Wed, Aug 17, 2016 at 3:25 AM, <[email protected]> wrote:

> Hi All,
>
> I am using AWS instance and running the kubernetes , We have upgraded the
> Influx and grafana to latest versions . I have a issue qureying the influxDB
>
> From the below query show the value from the hepster to influx . I have a
> issue in writing the dashboard for the values field which has the details
> in the json format . Please let me know how can we split the details from
> the json and build the graph .
>

How are you writing data into InfluxDB? Whatever your write source is, it
is writing JSON to a single field instead of writing to individual
key-value pairs. There are no string manipulation functions in InfluxDB, so
there is no way to return a partial value or parse the return.

If you can't change the write method, or if it is impractical to do so,
then you will have to process the return values client-side. InfluxDB can
only return a string field, it cannot manipulate it.

With prior versions, JSON was a valid input format. However, with InfluxDB
0.12 the JSON write path was removed. All writes to InfluxDB must be in
line protocol, or use one of the configured input plugins (or Telegraf's
input plugins).


>  select * from "log/events" limit 1 ;
> name: log/events
> ----------------
> time                    hostname
> pod_id                                  pod_name        uid
>                      value
> 1471343613000000000     ip-172-20-0-188.us-west-2.compute.internal
> 4ec8e180-6397-11e6-8794-0a54b296ed79    kapacitor-qizun
> e18d800a-639c-11e6-8794-0a54b296ed79    {
>  "metadata": {
>   "name": "kapacitor-qizun.146b43387c7f30ef",
>   "namespace": "default",
>   "selfLink": "/api/v1/namespaces/default/events/kapacitor-qizun.
> 146b43387c7f30ef",
>   "uid": "e18d800a-639c-11e6-8794-0a54b296ed79",
>   "resourceVersion": "629",
>   "creationTimestamp": "2016-08-16T10:33:33Z"
>  },
>  "involvedObject": {
>   "kind": "Pod",
>   "namespace": "default",
>   "name": "kapacitor-qizun",
>   "uid": "4ec8e180-6397-11e6-8794-0a54b296ed79",
>   "apiVersion": "v1",
>   "resourceVersion": "3604",
>   "fieldPath": "spec.containers{kapacitor}"
>  },
>  "reason": "Killing",
>  "message": "Killing container with docker id b1533c76b5ee: Need to kill
> pod.",
>  "source": {
>   "component": "kubelet",
>   "host": "ip-172-20-0-188.us-west-2.compute.internal"
>  },
>  "firstTimestamp": "2016-08-16T10:33:33Z",
>  "lastTimestamp": "2016-08-16T10:33:33Z",
>  "count": 1,
>  "type": "Normal"
> }
>
> Also , I need to know can we rewrite the TAG's in influx DB
>
> at present we have
>
> name: log/events
> ----------------
> tagKey
> hostname
> pod_id
> pod_name
> uid
>
>
> can i get write the TAG with the message , reason , kind ?? from the above
> json .
>

Tags are written at write time and cannot be altered later, except by
exporting, deleting, and reimporting the data.

It seems that you need to reconsider your write method, and properly break
out the data and metadata into key-value pairs before writing to InfluxDB.



>
> Regards,
> Sakthi
>
> --
> Remember to include the InfluxDB version number with all issue reports
> ---
> You received this message because you are subscribed to the Google Groups
> "InfluxDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/influxdb.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/influxdb/060f4f4c-a50e-4b09-b829-0e6d8a7cc3ae%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Sean Beckett
Director of Support and Professional Services
InfluxDB

-- 
Remember to include the InfluxDB version number with all issue reports
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/CALGqCvM%3DUg7gxnCoBmW4r8d3YBfWBt9FSHHV1RUA%3D65J_SOKNA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to