I use the InfluxDB addon and my InfluxDB database is getting too big. I already changed the retention policy to 365d but I want to make it even smaller by excluding entities that I don’t need little by little. I already know that the list will get long so I want to use an exclude.yaml
What are the steps that I need to take to have an exclude.yaml and have InfluxDB use that list?
Do I just make an exclude.yaml in the config folder then put the entities in there and then add exclude: !exclude.yaml in the configuration.yaml in the config folder?
I think a saw a detailed description some where, might have been, in a link from the installation, or maybe the documentation for the add-on, could be that there is a link you can follow, in the /configuration/add-ons/influxdb
I guess I’ll just use trial and error. I haven’t seen any examples, or I misunderstood what was posted. Where have you seen the syntax for exclude.yaml?
you use “extra” xxx.yaml files just to make life easier, not a big mess and huge configuration.yaml file, that’s why you can make additional yaml-files for “separate” purposes
edit: in short, exclude.yaml is not different from configuration.yaml … and yes you place that file in /config
It seems like you’re looking for a way to make a file called exclude.yaml where you put something in it and immediately the behavior of the InfluxDB integration changes. That doesn’t exist.
The way you exclude entities from being recorded in Influx is by adding include and exclude options to the influxdb configuration in your configuration.yaml. Those options are documented here. As @boheme61 noted, it works just like the recorder integration.
If you want, you can move this piece of the InfluxDB integration into a separate file as you can with anything else. See splitting up the configuration for the ways you can do that. If you really want a file called exclude.yaml where you put your exclude filters for example then you can can put this in your configuration.yaml (or wherever you have influxdb defined):
influxdb:
exclude: !include exclude.yaml
This file doesn’t have to be called exclude.yaml though, there’s no required name. It can be called my_giant_list_of_stuff_to_exclude_from_influxdb.yaml if you want, doesn’t matter as long as you !include it where you want to use it.
CentralCommand Mike spelled out how to do it in his post.
either include all by default, then put the ones you don’t want in exclude file
or exclude all by default and then put the ones you want in an include file
or a mix of the two.
What I quoted is really all I needed to know from the beginning. I acknowledged earlier that I need to find another way to ask my questions. If I had that would have been the first response without all of the other information included in the the responses.
The reason I only care about exclude is because only including exclude means everything else is included. At least that is how I understand Excludes, no includes - only exclude specified entities
By default, no entity will be excluded. To limit which entities are being exposed to InfluxDB, you can use the include and exclude parameters.
Filters are applied as follows:
No includes or excludes - pass all entities
Includes, no excludes - only include specified entities
Excludes, no includes - only exclude specified entities
I know I’m kind of beating a dead horse here but it is kind of spelled out in the doc. Still I do acknowledge that you found the doc tough (and I know it is a bit dense at times) so if you have any suggestions for how we can improve it please let me know. I am actually the code owner of this particular integration so I tried to make it understandable but there is a lot of info, especially with the two different versions.
We probably shouldn’t clog up this particular thread more so feel free to either DM me or just make a PR/issue in the docs repo and @ me (I’m mdegat01 on github).
Sorry bad joke. You replied to me looking at more doc made you more confused but I was noticing that it looked like the links I shared hadn’t been clicked. Doesn’t matter, we got there in the end.
What is spelled out in the doc? What part of my previous statements are you referring to?
I’ll reiterate. All I needed was excluded entities. I did not need included entities. I also wanted the excluded entities to be in a exclude.yaml file so that the long list was in a separate file. You did answer that part but it took a couple of posts including one that had more information than I needed. Now the part you quoted above does not mention exclude.yaml. I does have what I had copied and pasted which is ‘Excludes, no includes - only exclude specified entities’ To me that means everything except what I excluded will be included. If that is not it means then there needs to be clarification. If it needs more clarification then you are wrong about it being spelled out. Or are you saying something else was spelled out or are you trying to say I was right about the meaning but you still had to beat your chest to say it was there the whole time. I really hope it wasn’t the last.
You need to remember that not everyone understands everything the same. I have even read about engineers or software developers or computer scientists getting confused about many aspects of HA or yaml or some add-on such Node-red.
It looks like the counter is broke. Either way I had already read the documentation before creating the thread. You can see how that went.