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

reading default settings from gmond.conf #10

Open
dpocock opened this issue Mar 13, 2014 · 7 comments
Open

reading default settings from gmond.conf #10

dpocock opened this issue Mar 13, 2014 · 7 comments

Comments

@dpocock
Copy link
Member

dpocock commented Mar 13, 2014

It would be very useful to read all the default settings from the gmond.conf file if it can be found in one of the usual locations.

It may also be possible to inspect the list of open sockets of any running gmond process to discover configuration details.

@minkenlai
Copy link
Contributor

Might it be even better for gmetric4j to be able to communicate through gmond on localhost (push metrics through gmond)?

@dpocock
Copy link
Member Author

dpocock commented Jul 1, 2014

@ngzhian Thanks for your initial work on this.

Did you have a look through the libconfuse source code? https://github.com/martinh/libconfuse

Just a few comments:

  • could you do this work in a fork of the libconfuse repository so you can share the test cases?
  • is there any parser framework you could use to keep the C and Java parser in sync?
  • could you use any automated tool to quickly convert the C code to Java? As it is straight C and not C++, this shouldn't be too hard.

Please feel free to raise this on the libconfuse email list and CC me.

@ngzhian
Copy link
Contributor

ngzhian commented Jul 1, 2014

Yes I did briefly, I thought to rewrite the entire thing because the c
version relied on pointers. I will look at it more closely and attempt to
adhere to the c implementation as much as I can.
Also initially I wanted to use a Java parser generator such as javacc or
antlr, but that would introduce unnecessary dependencies for parsing such a
simple configuration file.
I think my next step is to fork the libconfuse to share the test case and
work on the Java translation.
On 1 Jul, 2014 8:29 pm, "Daniel Pocock" [email protected] wrote:

@ngzhian https://github.com/ngzhian Thanks for your initial work on
this.

Did you have a look through the libconfuse source code?
https://github.com/martinh/libconfuse

Just a few comments:

  • could you do this work in a fork of the libconfuse repository so you
    can share the test cases?
  • is there any parser framework you could use to keep the C and Java
    parser in sync?
  • could you use any automated tool to quickly convert the C code to
    Java? As it is straight C and not C++, this shouldn't be too hard.

Please feel free to raise this on the libconfuse email list and CC me.


Reply to this email directly or view it on GitHub
#10 (comment).

@dpocock
Copy link
Member Author

dpocock commented Jul 1, 2014

Don't be deterred by the use of pointers.

If the parser generator adds runtime dependencies then it is not ideal. If it is only a compile-time dependency then it is OK.

@dpocock
Copy link
Member Author

dpocock commented Aug 14, 2014

@ngzhian Zhi An, did you make any progress on this task? If so, can you let me know where I can see the code?

@ngzhian
Copy link
Contributor

ngzhian commented Aug 16, 2014

@dpocock not much progress on this sorry!

@cburroughs
Copy link

FWIW https://github.com/addthis/metrics-reporter-config uses the local gmond.conf but does so rather a pile of regex hacks.

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

No branches or pull requests

4 participants