grafana / alloy

OpenTelemetry Collector distribution with programmable pipelines
https://grafana.com/oss/alloy
Apache License 2.0
1.36k stars 194 forks source link

Embedded proxmox exporter #288

Open brngates98 opened 10 months ago

brngates98 commented 10 months ago

Request

Integrate this with Grafana Agents https://github.com/prometheus-pve/prometheus-pve-exporter

Use case

Added monitoring capabilities.

tpaschalis commented 10 months ago

Thanks for opening an issue! Would you be willing to contribute a new Flow component to support this?

We have a list of prometheus.exporter.* components which can be used as an inspiration, the code is mostly boilerplate. Furthermore, it'd mean writing a docs page for the new components, similar to how other components are documented.

If you have access to a proxmox environment for actual testing, that would be even better!

brngates98 commented 10 months ago

Yea I could do that!

Probably won’t make a lot of traction till after holidays however.

Cheers

On Mon, Dec 18, 2023 at 6:51 AM Paschalis Tsilias @.***> wrote:

Thanks for opening an issue! Would you be willing to contribute a new Flow component to support this?

We have a list of prometheus.exporter.* https://github.com/grafana/agent/tree/main/component/prometheus/exporter components which can be used as an inspiration, the code is mostly boilerplate. Furthermore, it'd mean writing a docs page for the new components, similar to how other https://github.com/grafana/agent/blob/main/docs/sources/flow/reference/components/prometheus.exporter.postgres.md components are documented.

If you have access to a proxmox environment for actual testing, that would be even better!

— Reply to this email directly, view it on GitHub https://github.com/grafana/alloy/issues/288, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOFQ2CM6ZPKIMVNZJD4AFKLYKAU2NAVCNFSM6AAAAABAY4KOI6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRQGI3TCOBVGI . You are receiving this because you authored the thread.Message ID: @.***>

tpaschalis commented 10 months ago

Great @brngates98 🙌 ! Let us know if you need any pointers or help!

brngates98 commented 10 months ago

Sounds great!

I am setting up my dev environment now so i can contribute to the agent appropriately This is the correct guide to follow? https://github.com/grafana/agent/blob/main/docs/developer/contributing.md

$ mkdir -p $GOPATH/src/github.com/grafana $ cd $GOPATH/src/github.com/grafana $ git clone https://github.com/grafana/agent.git $ cd agent $ make agent $ ./build/grafana-agent -config.file=your_config.yml

brngates98 commented 10 months ago

One silly question since this is my first time actually publicly contributing, should i fork the repo or is that sufficient to actually build my integration, and compile it, test it, how would i then present a pull request to give the new integration?

tpaschalis commented 10 months ago

Let me provide some context here: Grafana Agent has two modes: static mode and flow mode.

Static mode is configured via YAML, and bolts together parts of Prometheus, Promtail and the OTel collector.

Our development efforts during this past year have been concentrating on Flow mode, a component-based revision, that uses an HCL-inspired configuration language called River. So ideally, we would like this new feature to be implemented as a new Flow component, similar for example to how prometheus.exporter.apache works.

Many of these components have parts of their code under pkg/integration, as they were also working for Static mode. You don't have to do this, but you can only use it for reference so you can implement the same interfaces inside of your component code to make your code compile.

Also, given how we use Go modules, you don't have to work inside of $GOPATH. You can simply do

$ git clone https://github.com/grafana/agent.git
$ cd agent
$ make agent
$ AGENT_MODE=flow ./build/grafana-agent run /path/to/config.river
# alternatively
$ make agent-flow
$ ./build/grafana-agent-flow run /path/to/config.river

should i fork the repo or is that sufficient to actually build my integration, and compile it, test it, how would i then present a pull request to give the new integration

Finally, yes, the recommended way is to fork the repo, push changes to a branch on your fork, and then open a PR towards the grafana/agent repo here.

brngates98 commented 10 months ago

Brilliant! thanks for that breakdown!

flow mode makes the most sense for me also, although i should probably include support for static(i likely will easy enough anyways)

Lets see if i cant make this integration a reality :)

tpaschalis commented 9 months ago

Hey there @brngates98, hope you had a good time during the holidays.

Just posting to let you know we're available for any help you might need :)

brngates98 commented 9 months ago

Howdy howdy! Holidays were pretty good, how about yours?

I do actually have a few questions but ill have to post them later this evening as i am not near my computer but wanted to respond, saw you're reply yesterday and got sidetracked.

github-actions[bot] commented 8 months ago

This issue has not had any activity in the past 30 days, so the needs-attention label has been added to it. If the opened issue is a bug, check to see if a newer release fixed your issue. If it is no longer relevant, please feel free to close this issue. The needs-attention label signals to maintainers that something has fallen through the cracks. No action is needed by you; your issue will be kept open and you do not have to respond to this comment. The label will be removed the next time this job runs if there is new activity. Thank you for your contributions!

tpaschalis commented 8 months ago

Hey there @brngates98 👋 how's it going?

I wanted to check-in on you, see if you were still interested in contributing the new component and if there's something we can help with.

brngates98 commented 8 months ago

hey there yes, still interested just got side tracked with some things, hopefully make some progress here soon.

SnowyJaguar1034 commented 1 month ago

hey there yes, still interested just got side tracked with some things, hopefully make some progress here soon.

Hiya, just wondering how far through this you'd got? I'd be interested in this functionality for Grafana Alloy, I don't know much about how the agents are coded but I'd be interested in contributing towards your repo if I find the time.