These are chat archives for CZ-NIC/knot-resolver

10th
Jan 2019
Jonathan Coetzee
@jcoetzee
Jan 10 06:36
Does event.recurrent() execute immediately and then every subsequent interval thereafter or just after each interval? Docs imply the latter but I'm experiencing the former.

From docs:

Similar to event.after(), periodically execute function after interval passes.

Vladimír Čunát
@vcunat
Jan 10 08:09
You're right. The docs doesn't seem very clear about it. The implementation sets the first timer interval to zero, which is a bit weird to me from use-case point of view, as the user can easily call the function again immediately if she likes.
Vladimír Čunát
@vcunat
Jan 10 08:16
We'll think on which of the two to fix.
Jonathan Coetzee
@jcoetzee
Jan 10 10:45
Yeah, the functionality described by the docs makes the most sense to me but changing the implementation might break people's existing code. Right now I'm wrapping .recurrent() in an .after() with the same interval time to achieve what I want.
bhanupratapys
@bhanupratapys
Jan 10 11:03
Hello guys , is it possible to predefine the custom name while exporting the metrics with graphite module instead of using the hostname ? If i use hostname then metronome doesnt recognise the metrics.
Guys any solution for this? Or it is not possible to change the name at this moment ?
Petr Špaček
@pspacek
Jan 10 11:57
@bhanupratapys Hello! We have missed that, let me see.
I do not see problem in code, what exactly is not working for you?
Prefix can be configured to any string value and it is up to the received (Graphite) to deal with whatever you configured.
Jonathan Coetzee
@jcoetzee
Jan 10 12:17
@pspacek I've integrated my changes with policy.lua locally. How can I submit an MR? I don't seem to be able to fork the repo on gitlab.
bhanupratapys
@bhanupratapys
Jan 10 12:30
@pspacek Hello! In order to knot to work with metronome, the knot resolver should send the name in the format "pdns.yourname.recursor". Because metronome only recognizes the following name formats "pdns.yourname.recursor" or "pdns.yourname.auth" or "dnsdist.yourname.main".
I was only able to send the name in the format "systemhostname" or "knot.systemhostname"
In order to work I need to send it in the format "pdns.yourname.recursor". How can I accomplish this?
Petr Špaček
@pspacek
Jan 10 13:24
@jcoetzee Tell me your Gitlab login and I will ask admins to raise fork limits for you.
@bhanupratapys Have you tried to set prefix to "pdns.yourname.recursor"?
Jonathan Coetzee
@jcoetzee
Jan 10 13:36
@pspacek @jono :thumbsup:
bhanupratapys
@bhanupratapys
Jan 10 14:02
@pspacek Nope , it doesn't work. The only option i can think of is editing https://github.com/ahupowerdns/metronome/blob/master/html/graphs.js
Petr Špaček
@pspacek
Jan 10 14:30
That's possible, I guess they use different variable names so changing prefix is not enough.
@jcoetzee You should be able to fork now.
Jonathan Coetzee
@jcoetzee
Jan 10 17:38
@pspacek Pushed MR. Lemme know if anything needs changing