Skip to content
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

DSC to influxDB failing #31

Closed
ghost opened this issue Apr 27, 2019 · 12 comments · Fixed by #32
Closed

DSC to influxDB failing #31

ghost opened this issue Apr 27, 2019 · 12 comments · Fixed by #32
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Apr 27, 2019

On the collector side, when collection is done for:
dataset second_ld_vs_rcode dns Rcode:rcode SecondLD:second_ld replies-only max-cells=50;

Sometimes queries are received for null names:

<array name="second_ld_vs_rcode" dimensions="2" start_time="1556173500" stop_time="1556173560">
  <dimension number="1" type="Rcode"/>
  <dimension number="2" type="SecondLD"/>
  <data>
    <Rcode val="0">
      <SecondLD val="org.za" count="2"/>
      <SecondLD val="" count="2"/>
      <SecondLD val="amazonaws.com" count="1"/

which ends up after DSC-datatool as

second_ld_vs_rcode,server=servername,node=ns.coza.net.za,rcode=5,secondld= value=2 1556174460000000000

which chokes when fed into 'influx -import' because of the missing value @ "secondld="

dsc-datatool needs to add a null character when encountered, to prevent the influxdb import from breaking.

@jelu
Copy link
Member

jelu commented Apr 30, 2019

I believe I can fix this quite quickly but I'm having a hard time to find the time to do it as we are ramping up for our annual workshop :/

@ghost
Copy link
Author

ghost commented May 7, 2019

Yeah - done some looking at this - It seems to me that influxdb doesn't understand the concept of Null characters - so simply setting it to 'Null' as a string seems to work - not sure if that may cause problems going forward.

Naturally, if DSC-datatool could do this for us, life would be good.

@ghost
Copy link
Author

ghost commented May 28, 2019

Any updates on this? Anything I can do/supply to move this forward?

@jelu
Copy link
Member

jelu commented May 28, 2019

Just got back today from a lot of traveling, will look at this ASAP

@jelu jelu added the bug label May 28, 2019
@jelu jelu self-assigned this May 28, 2019
@jelu
Copy link
Member

jelu commented May 30, 2019

Looking at this now, and a little searching tells that it might have worked before (somewhat):

You cannot search for nulls in InfluxDB <0.9. You will not be able to insert nulls in Influx >=0.9

It also looks like InfluxDB have much better support for quoting then it did when I first made this :)

@ghost
Copy link
Author

ghost commented May 30, 2019 via email

jelu added a commit to jelu/dsc-datatool that referenced this issue May 30, 2019
- `Output::InfluxDB`: Fix DNS-OARC#31: Quote empty values as `""`
This was referenced May 30, 2019
@jelu jelu closed this as completed in #32 May 30, 2019
@jelu
Copy link
Member

jelu commented May 30, 2019

That was a quick and easy fix, sorry that it took so long.

Can you test using the develop branch or do you need a release? If so, what dist?

@ghost
Copy link
Author

ghost commented May 30, 2019

As soon as i work out how to clone the development branch, I'll test.

@jelu
Copy link
Member

jelu commented May 30, 2019

git clone https://github.com/DNS-OARC/dsc-datatool.git
cd dsc-datatool
git checkout develop

@ghost
Copy link
Author

ghost commented May 30, 2019

looking good on my test stuff - throwing it at some live data - will revert

@ghost
Copy link
Author

ghost commented May 30, 2019

Right - done and dusted - adding you to my list of people I owe a beer/coffee to.

@jelu
Copy link
Member

jelu commented May 30, 2019

Great to hear :) I will make a release in the coming days.

If you want to support DNS-OARC and our software please consider becoming a member. There is also options to do one-time donation, let me know if so!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant