prometheus / snmp_exporter

SNMP Exporter for Prometheus
Apache License 2.0
1.65k stars 614 forks source link

Ditch netsnmp for another SNMP library (maybe pysnmp) #55

Closed pherelad closed 8 years ago

pherelad commented 8 years ago

Hi there,

I love this project, and use the exporter on a few Linux boxes. However, I don't see this as a complete solution because of the problems I've had installing this on Windows (never got it to work). I'm unable to seriously consider using this in a production environment at work. The problem is purely deployment related. It seems to me that removing the dependency on netsnmp would help alleviate this problem. Perhaps another snmp module like pysnmp would be a reasonable alternative? It seems to have the exact same functionality, while being much easier (and likely) to install successfully, without requiring code to be compiled.

The hoops I had to jump through for Windows involved having the VC tool-chain installed, then getting the source for NET-SNMP, then compiling it, then jumping into a python sub-directory and trying to do make setup.py install (never worked). This isn't a shortcoming of snmp_exporter, but in NET-SNMP IMO. For that reason, I'd recommend ditching NET-SNMP since it's only holding this project back IMO.

I'd be happy to help test if someone else could take a crack at migrating to another SNMP library.

Thanks everyone,

Christopher

RichiH commented 8 years ago

My work (SpaceNet AG) contracted @brian-brazil to re-implement the whole thing in Go. It does not make sense to put effort in the Python version any more.

RichiH commented 8 years ago

For reference: https://github.com/prometheus/snmp_exporter/issues/53

brian-brazil commented 8 years ago

Perhaps another snmp module like pysnmp would be a reasonable alternative?

We used to use PySNMP, we had to switch on performance grounds.

pherelad commented 8 years ago

Ah, gotcha; that makes sense. I'm glad to hear it's being implemented in Go. I'll check out that version and see if it's got a dependency on NET-SNMP as well. Thanks for the feedback :+1: Since it's going to be re-implemented anyway and you've already attempted to use a different implementation, I'd be fine if this was closed.

Thanks again!

brian-brazil commented 8 years ago

There should be no netsnmp dependency in the Go version (for the exporter anyway, the config generator will have one).

pherelad commented 8 years ago

Hi @brian-brazil ! Interesting. So if I manually author the configuration file, then I should be able to run the exporter/collector without a dep on the netsmtp library?

brian-brazil commented 8 years ago

That's the plan. As is stands the most viable way of getting to the information needed to parse MIBs is netsnmp, so it'll likely end up as a dep of the config generator.

pherelad commented 8 years ago

Cool, I can live with that. From the Windows side of things that sort of sucks, but manually creating the config file, while painful, is an option. Thanks for the info @brian-brazil :D

brian-brazil commented 8 years ago

I can't imagine it'd be that hard to get your hands on a Unix box, copy over your MIBs and generate the config.

pherelad commented 8 years ago

Ah, good thinking. I'll give that a shot. Thanks!