I am not familiar with the Python library syntax requirements. For InfluxDB
0.13 the JSON write path is no longer valid. All writes must use the line
protocol:
https://docs.influxdata.com/influxdb/v0.13/write_protocols/write_syntax/.


On Mon, Aug 29, 2016 at 1:26 AM, related2blog <[email protected]>
wrote:

> Hi Sean,
>
> it's not python client issue, schema has been changed i guess, below is
> the format i use for old version.
>
> can u please tell me how to write data in new format, which resembles the
> way i want to write in old version.
>
>
> db_str=[
>
>         {
>
>             "name": "vm_data",
>
>             "columns": ["running","stopped" ],
>
>             "points": [[1],[2]]
>
>         }
>     ]
>
> new version is uses some thing like below,
>
>
> sb_str = [
>         {
>             "measurement": "cpu_load_short",
>             "tags": {
>                 "host": "server01",
>                 "region": "us-west"
>             },
>             "time": "2009-11-10T23:00:00Z",
>             "fields": {
>                 "value": 0.64
>             }
>         }
>     ]
>
>
> Thank you very much.
>
>
> On Sun, Aug 28, 2016 at 4:12 PM, related2blog <[email protected]>
> wrote:
> > Hi Sean,
> >
> > Sorry to bother you again, i felt happy because i fixed it, but now i
> have
> > difficulty in writing into data base.
> >
> > I'm using python-influxdb client. which was working fine with old
> version,
> > but not i upgraded my ubuntu 14.04 to 16.04 because of latest influx (no
> > python-influxdb available for 14.01, i was using pip install which is not
> > supported by latest influxdb) and grafana.
> >
> >
> >
> > I'm hitting below error.
> >
> > ============================================================
> =========================
> >
> > 2 ubuntu@ip-172-31-14-209:~/migration⟫ python influx.py
> >
> > [{'points': [[1]], 'name': 'ionos-test', 'columns': [['large']]}]
> >
> > Traceback (most recent call last):
> >
> >   File "influx.py", line 8, in <module>
> >
> >     CustomModules.db(db_str,'subbu')
> >
> >   File "/home/ubuntu/migration/mod.py", line 37, in db
> >
> >     client.write_points(string)
> >
> >   File "/usr/lib/python2.7/dist-packages/influxdb/client.py", line 391,
> in
> > write_points
> >
> >     tags=tags)
> >
> >   File "/usr/lib/python2.7/dist-packages/influxdb/client.py", line 436,
> in
> > _write_points
> >
> >     expected_response_code=204
> >
> >   File "/usr/lib/python2.7/dist-packages/influxdb/client.py", line 276,
> in
> > write
> >
> >     data=make_lines(data, precision).encode('utf-8'),
> >
> >   File "/usr/lib/python2.7/dist-packages/influxdb/line_protocol.py",
> line
> > 117, in make_lines
> >
> >     for field_key in sorted(point['fields'].keys()):
> >
> > KeyError: u'fields'
> >
> > ============================================================
> ==============================
> >
> > my code.
> >
> >
> > ==============================
> >
> > from influxdb import InfluxDBClient
> >
> >
> > def db(string, db, host='localhost', port=8086):
> >
> >     user = 'root'
> >
> >     password = 'ionos_123'
> >
> >     dbname = db
> >
> >     client = InfluxDBClient(host, port, user, password, dbname)
> >
> >     client.write_points(string)
> >
> >
> > db_str =[{"points": [[1]],
> >
> >                    "name": "ionos-test",
> >
> >                    "columns": [["large"]]}]
> >
> > db(db_str,'subbu')
> >
> >
> > =============================
> > thank you very much in advance.
> >
> > On Sat, Aug 27, 2016 at 1:34 AM, Sean Beckett <[email protected]> wrote:
> >>
> >> The query language is significantly different between 0.8 and 0.9+, so
> >> you'll need to add the database to Grafana as an InfluxDB 0.9+ data
> source.
> >>
> >> http://docs.grafana.org/datasources/influxdb/#adding-the-data-source
> >>
> >> On Fri, Aug 26, 2016 at 1:58 PM, related2blog <[email protected]>
> >> wrote:
> >>>
> >>> Thank you very much, Sean
> >>>
> >>> White paper u sent me  , awesome. I tested it and worked. Only one
> final
> >>> question my grafana is old, what seen was grafana queries not working
> with
> >>> new version of influx. Is it expected ? Need my grafana to be upgraded
> as
> >>> well ?
> >>>
> >>> Manny.
> >>>
> >>>
> >>> On Aug 26, 2016 12:22 AM, "Sean Beckett" <[email protected]> wrote:
> >>>>
> >>>> We have extensive documentation and webinars on how to upgrade from
> >>>> 0.8.x to InfluxDB 0.13. There are a number of breaking changes to the
> API,
> >>>> write protocol, query language, storage engine, and administrative
> tools. It
> >>>> is not a trivial upgrade, and requires exporting all the data from
> 0.8.x and
> >>>> re-importing it into InfluxDB 0.13.
> >>>>
> >>>> Please see the Migration white paper on
> >>>> https://influxdata.com/technical-papers/ and the Migration webinar
> video on
> >>>> https://influxdata.com/videos-training/.
> >>>>
> >>>> On Thu, Aug 25, 2016 at 9:07 AM, <[email protected]> wrote:
> >>>>>
> >>>>> Hi Sean,
> >>>>>
> >>>>> I'm using influxdb for quite some time, Since my app working fine for
> >>>>> long time i forgot to upgrade my db, lately i had an issue which
> forces me
> >>>>> to backup the db, i neither can backup or migrate. I dont see any
> info
> >>>>> regarding the version 0.8.8.
> >>>>>
> >>>>> All i found was using curl command i can load all the data to a json
> >>>>> file, but i dont see a way to write it to new version of db, i also
> tried
> >>>>> installing new version of influx and tried writing the info like
> below
> >>>>>
> >>>>> db_str =[{"points": [[2016,1,2,3]],
> >>>>>                    "name": "ionos-test",
> >>>>>                    "sequence_number": 2724430001,
> >>>>>                    "columns": ["time","total", "val1", "val2"]}]
> >>>>>
> >>>>> but i hit below error, what l learnt from below error is , db is
> >>>>> expecting time in diff format, but my json has only epoc
> >>>>>
> >>>>> "InfluxDBClientError: 400: json: error calling MarshalJSON for type
> >>>>> time.Time: Time.MarshalJSON: year outside of range [0,9999]"
> >>>>>
> >>>>> i stuck very badly please let me know how to migrate to newer version
> >>>>> which has backup option. At lease in worst case please suggest me
> how can i
> >>>>> back up and restore. I prefer upgrade becase its time series data.
> >>>>>
> >>>>> Thank you very much.
> >>>>> manny
> >>>>>
> >>>>> On Thursday, March 17, 2016 at 12:04:10 AM UTC+5:30, Sean Beckett
> >>>>> wrote:
> >>>>> > On Wed, Mar 16, 2016 at 8:37 AM,  <[email protected]> wrote:
> >>>>> > I am performing zero-downtime upgrade using scenario #2 from this
> >>>>> > presentation
> >>>>> >
> >>>>> > (slide #13,
> >>>>> > http://www.slideshare.net/SeanBeckett4/influxdb-upgrade-
> to-010-considerations)
> >>>>> >
> >>>>> >
> >>>>> >
> >>>>> > My current config:
> >>>>> >
> >>>>> > running influxdb-0.10.3-1
> >>>>> >
> >>>>> > data files in bz1 format created by influxdb-0.9.6.1
> >>>>> >
> >>>>> >
> >>>>> >
> >>>>> > I have updated InfluxDB binary, started it and see that it
> continues
> >>>>> > to write to existing data file in bz1 format.
> >>>>> >
> >>>>> >
> >>>>> >
> >>>>> > How do I start a new data file in tsm1?
> >>>>> >
> >>>>> > Or the only option is to wait until Influxdb desides to start a new
> >>>>> > shard?
> >>>>> >
> >>>>> >
> >>>>> >
> >>>>> > Yes, when the shards roll over the new shard file will be TSM
> format.
> >>>>> >
> >>>>> >
> >>>>> >
> >>>>> > I don't see option 'engine = tsm1' in a new configuration file and
> I
> >>>>> > don't feel like trying to use this on new setup.
> >>>>> >
> >>>>> >
> >>>>> >
> >>>>> > There is no configuration option because there is no choice. All
> new
> >>>>> > shard files will be TSM files. Existing b1/bz1 files will be
> written to
> >>>>> > until they go cold for writes, at which time you can convert them
> to TSM.
> >>>>> >
> >>>>> >
> >>>>> >
> >>>>> > Thanks!
> >>>>> >
> >>>>> >
> >>>>> >
> >>>>> > --
> >>>>> >
> >>>>> > 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/b8454246-82d4-
> 4ec5-babb-e1b96a7ef4ba%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/4fdfb344-9837-
> 4d64-b763-8418d7216eaf%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 a topic in the
> >>>> Google Groups "InfluxDB" group.
> >>>> To unsubscribe from this topic, visit
> >>>> https://groups.google.com/d/topic/influxdb/Zg9AVkSiYPs/unsubscribe.
> >>>> To unsubscribe from this group and all its topics, 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/CALGqCvNTTjc-%2Bmq-vvs_
> yt7DX2u9XQ1bSsYKB3NxL%2BaZYL8kjA%40mail.gmail.com.
> >>>> For more options, visit https://groups.google.com/d/optout.
> >>>
> >>> --
> >>> 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/CAP6%
> 2BsvR6z7kuCRdCWLHYi09mo%3D39LtvyKJ-gYx_ZWpj2%2BrpTDQ%40mail.gmail.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 a topic in the
> >> Google Groups "InfluxDB" group.
> >> To unsubscribe from this topic, visit
> >> https://groups.google.com/d/topic/influxdb/Zg9AVkSiYPs/unsubscribe.
> >> To unsubscribe from this group and all its topics, 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/CALGqCvP%
> 3DXGggetRLXaJKAebahVBi3iR8d3aXeD4Y1X53hSdFaw%40mail.gmail.com.
> >>
> >> For more options, visit https://groups.google.com/d/optout.
> >
> >
>
> --
> 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/CAP6%2BsvRLTWh6vMDPoVO%3DrTT2EsdLH533ctZdcGKNQyoWgKQ9
> jA%40mail.gmail.com
> <https://groups.google.com/d/msgid/influxdb/CAP6%2BsvRLTWh6vMDPoVO%3DrTT2EsdLH533ctZdcGKNQyoWgKQ9jA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> 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/CALGqCvMSKgkWXWMwQ1CAZArVfV9Up-2h08u6aJv2LfNd4DuMFQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to