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

TCP or unix socket interface for integration with 3rd-party tools #14

Open
kaero opened this issue Nov 19, 2012 · 10 comments
Open

TCP or unix socket interface for integration with 3rd-party tools #14

kaero opened this issue Nov 19, 2012 · 10 comments

Comments

@kaero
Copy link

kaero commented Nov 19, 2012

May be my request poisons KISS principles, but it can be a great feature for integration with other tools without a need to parse text output from STDOUT.

@tj
Copy link
Owner

tj commented Nov 20, 2012

anything specific in mind? the "hook" commands could do whatever you want already

@kaero
Copy link
Author

kaero commented Nov 21, 2012

Under the "hook" you mean the --on-error and --on-restart options?

I near about creation a tiny web interface for a bunch of mon processes, but retrieving info about all mon instances, their options and current status looks a bit tricky and implicit without mon master-process or another common end-point for retrieving info about all running mon instances.

@tj
Copy link
Owner

tj commented Nov 21, 2012

ah I see, yeah maybe someday we can write mongroup in C and add some json networking stuff but that would be pretty annoying in shell scripts right now. you could still write a web thing but mon would have to become an internal implementation detail pretty much like mongroup, you dont even consider mon in that tool it's just there

@kaero
Copy link
Author

kaero commented Nov 21, 2012

ok, thanks for the answer. I think it's a time for monit.

@kaero kaero closed this as completed Nov 21, 2012
@tj
Copy link
Owner

tj commented Nov 21, 2012

I do like dashboards etc, so I'd be happy to add something, I'll think on it. Even if the stdio was a more machine-friendly format, or a json option that would be much better

@kaero
Copy link
Author

kaero commented Nov 21, 2012

Mm… maybe an option in addition to -S to select output format: human-readable or some machine-friendly?

@tj
Copy link
Owner

tj commented Nov 21, 2012

yeah I think that would be good, nothing wrong with using stdio, it's easy enough to tail a file or pipe. I'll reopen

@tj tj reopened this Nov 21, 2012
@kaero
Copy link
Author

kaero commented Nov 21, 2012

Yeah, thanks!

@emberian
Copy link

emberian commented Dec 2, 2012

You can use socat to redirect to any sort of socket you want. eg, mon foo | socat TCP4:host:port - or mon foo | socat UNIX-CONNECT:/path/to/socket -. It's a great tool.

@tj
Copy link
Owner

tj commented Dec 17, 2012

was just thinking about this a bit, we're definitely better off going with a fifo or unix socket, less chance of people polluting stdio

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

3 participants