Griesbacher / nagflux

A connector which copies performancedata from Nagios / Icinga(2) / Naemon to InfluxDB
GNU General Public License v2.0
65 stars 32 forks source link

Write metrics to different influxdb databases #25

Closed adrianlzt closed 7 years ago

adrianlzt commented 7 years ago

I have discovered this project while making a PR to mod_gearman.

I'm trying also to send icinga perfdata to InfluxDB, but I need to send each perfdata to a different database based on a custom template defined in each host.

Any idea if it will be possible to handle this with nagflux?

Thanks!

Griesbacher commented 7 years ago

Hi, at the moment it not possible to do that, if mod_gearman is not able to do so. You could only collect the data from multiple mod_gearman servers but send them just to one InfluxDB. But we were already talking about something like that and I'll add such feature when I'm back to work, in a some weeks. I was thinking about something like, multiple named serverconfigs within the nagflux config and if such a name is passed by a perfdata the data will be send to the corresponding InfluxDB. If the field is empty the default InfluxDB will be chosen. Greetings Philip

adrianlzt commented 7 years ago

And choosing the influxdb databse with a custom variable? @sni is thinking in expanding mod_gearman to be able to add custom variables: https://github.com/sni/mod_gearman/pull/108#issuecomment-277254165

Griesbacher commented 7 years ago

Exactly, e.g. you're setting a customvariable like NAGFLUX::TARGET to server1, then nagflux would send the data to the server1, which config/address is stored in a the nagflux config

sni commented 7 years ago

It would be possible if Mod-Gearman had a customizable performance data template so you could just define the data like ex.: ...NAGFLUX:DB=$_HOSTINFLUXDB$ or something like that.

adrianlzt commented 7 years ago

That would be perfect

On Fri, Feb 3, 2017, 15:40 Sven Nierlein notifications@github.com wrote:

It would be possible if Mod-Gearman had a customizable performance data template so you could just define the data like ex.: ...NAGFLUX:DB=$_HOSTINFLUXDB$ or something like that.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Griesbacher/nagflux/issues/25#issuecomment-277262667, or mute the thread https://github.com/notifications/unsubscribe-auth/ADFnmKiQP2JTBnXLpDgQpQhuKhWsLHSQks5rYzxLgaJpZM4L1rFv .

adrianlzt commented 7 years ago

Any update on this? Thanks

Griesbacher commented 7 years ago

I'll be back at the office in one week and tackle the problem then. It's not forgotten.

Griesbacher commented 7 years ago

The latest release should solve this issue.