-
Notifications
You must be signed in to change notification settings - Fork 118
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
Zabbix proxy sqlitedir - Need help #115
Zabbix proxy sqlitedir - Need help #115
Conversation
Pull commits from master into fork
Create folder for SQLite database if defined in zabbix-proxy pillar data.
Ok so I tested that by defining something not the default for
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xenadmin yeah it looks like /var/lib/zabbix
is not created during zabbix-proxy
package installation. I added a simple check for dbname
param, if it starts with a /
it's most probably a file path, and not a MySQL DB name.
Note I have not tested suggested changes, but I hope everything is correct :)
Thank you so much for your help! I love it that this formula gets some love. By now I’m so good with salt, that I manage 33 Zabbix Proxies with it, using 51 states. (If I remember correctly) Currently I’m on vacation, sorry. Can’t review anything right now. Maybe we can talk in about 10 days? |
startswith('/') Co-Authored-By: Roman <[email protected]>
I reviewed your changes @hatifnatt looks good. |
As many people use SQLite for Zabbix proxy, I think it's obvious that the definition of a SQLite in the pillar database has to create the directory. I handled that in a separate state until now, but I find it odd that the official formula has to fail inevitable, because the Zabbix proxy daemon will never launch, because the directory is missing.
But this pull request has a big drawback I think. I someone would like to use a real MySQL or MariaDB, this shouldn't be executed.
I need some kind of IF statement, that will check if
dbname
contains a word or a path. I wasn't able to fix that yet. If we solve that, this will be a very helpful addition, as the formula will fail otherwise for all SQLite users.