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

Define custom tags for service's series #41

Open
VinceTT opened this issue Dec 19, 2016 · 7 comments
Open

Define custom tags for service's series #41

VinceTT opened this issue Dec 19, 2016 · 7 comments

Comments

@VinceTT
Copy link

VinceTT commented Dec 19, 2016

Is it possible to add custom influxdb tags for shinken service's series ?
Maybe a predefined field of service configuration can be used to do this ?

@fpeyre
Copy link
Contributor

fpeyre commented Dec 20, 2016

I will take a look on this today.

@fpeyre
Copy link
Contributor

fpeyre commented Dec 21, 2016

Ok after quick test, I propose the following thing

We can add a macro for our host/service like _INFLUX_TAG. The value associate to this macro is our custom_tag. The tag key in influxdb is custom, its value is our _INFLUX_TAG value.

Before the end of the week I should be able to code this function for testing

@VinceTT
Copy link
Author

VinceTT commented Dec 22, 2016

Hi @fpeyre, thanks so much for your reply.

For me your solution is very interesting and will allow me to classify my datas.
Do you think there is a way to extend this to mulitple custom tags without too impact on performances ?

@fpeyre
Copy link
Contributor

fpeyre commented Dec 22, 2016

This is a little tricky and related to InfluxDB.

First many link/information about InfluxDB and how it works:

Now in our case:

  • Currently, we create a measurement for each metrics that we have in our Shinken. For example, a basic check_ping send 2 perfdata (rta and pl) so we have 2 series for all service/hosts using check_ping.

  • The measurement had 2 tags: host and service, so the cardinality is related to your number of hosts/services and metrics

Adding a new tag add is a new factor to increase this cardinality. In a majority of use case, it's something we can take the liberty of doing.

To answer to your question, I can code something to use many tag.

For example :

_INFLUX_TAG    T1: v1, T2:v2, T3:V3

Who make the service/host have 3 tags T1, T2 and T3 with respective values v1, v2 and v3.
But dependently how you use it and your usecase , you can increase the cardinality realy fast.

@VinceTT
Copy link
Author

VinceTT commented Dec 22, 2016

Thanks for this information about the influxdb cardinality !
I understand better the impact on performances of adding tags.
In my point of view, your solution with the format _INFLUX_TAG T1: v1, T2:v2, T3:V3 is flexible and allow all possible configurations.

@fpeyre
Copy link
Contributor

fpeyre commented Dec 22, 2016

I make a branch with the feature, available here: https://github.com/savoirfairelinux/mod-influxdb/tree/add_custom_tag
I test it , it works with the format _INFLUX_TAG T1: v1, T2:v2, T3:V3 so you can test it

I must write some test but i have not time to do it now. Maybe we can merge the branch and make a new release on shinken install during January

@VinceTT
Copy link
Author

VinceTT commented Dec 23, 2016

Thanks @fpeyre !
I'll try it out now.

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

2 participants