New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't write data into system #141
Comments
Sure can: Note that a few days ago, I was doing a quick PoC, and write_points seemed to be working fine. (I mention that because that's what your code is doing) |
FWIW, your script is working fine for me as well. I updated it to look as much like mine as I could see, and it still worked. (I have your gist, tweaked, at the bottom of my gist, now) |
Hm. I will have a more detailed look tomorrow... On a first glance, it looks like a side effect from an external source (maybe Virtus attributes are not serialized correctly or sth. similar, but that's just guessing). |
Perhaps, but I'd take a look at my initial comment before delving into that too far. I altered the gem to print out the url and request body just before kicking the thing off to net/http. It looks pretty clean, and if I put 'insert' in front of those line queries in the CLI, the data went in just fine. |
Hey guys, the problem was that my timestamps were in the future, and there appears to be an implicity 'where' time < now() going on. Once I changed the timestamps, everything worked. Thanks for helping me debug! |
D'oh, of course... Well I'm glad you figured it out :-) |
I printed out the url and data being sent while trying to perform a write:
(the url path was the same for all)
/write?db=connectder_test&precision=s&u=root&p=root
This is the insert data (that works on the CLI directly)
"units_all,device_unit_id=UNIT_000 active_watts=5.0,consumed_energy=5.0,frequency=5.0,power_factor=5.0,reactive_watts=5.0,rms_voltage=5.0,temperature=5.0 1461848446"
"units_all,device_unit_id=UNIT_001 active_watts=5.0,consumed_energy=5.0,frequency=5.0,power_factor=5.0,reactive_watts=5.0,rms_voltage=5.0,temperature=5.0 1461852046"
"units_all,device_unit_id=UNIT_002 active_watts=5.0,consumed_energy=5.0,frequency=5.0,power_factor=5.0,reactive_watts=5.0,rms_voltage=5.0,temperature=5.0 1461855646"
"units_all,device_unit_id=UNIT_003 active_watts=5.0,consumed_energy=5.0,frequency=5.0,power_factor=5.0,reactive_watts=5.0,rms_voltage=5.0,temperature=5.0 1461859246"
"units_all,device_unit_id=UNIT_004 active_watts=5.0,consumed_energy=5.0,frequency=5.0,power_factor=5.0,reactive_watts=5.0,rms_voltage=5.0,temperature=5.0 1461862846"
For some reason, the result of these operations is to insert a single record, and if I run
show series
, I will see 5 distinct series in the system. Just only 1 data record.The text was updated successfully, but these errors were encountered: