# Zabbix database choices



## Phishfry (Feb 22, 2019)

I have been messing around building Zabbix from ports.
There are many Zabbix versions in ports.
Zabbix22
Zabbix3
Zabbix32
Zabbix34
Zabbix4

I started at Zabbix4 since I am new. But it does not have the port build option for sqlite.
So I dropped back to Zabbix34 and sqlite is available as an port option.

Is sqlite ok to use with Zabbix34? I want to start with a light DB and it fits the bill.
From what I can gather sqlite is not very popular on Zabbix. MariaDB might be the best option.

Thoughts about Zabbix DB?
nginx for the web server is acceptable. Can I use any other web servers like lighttpd?


----------



## SirDice (Feb 22, 2019)

I'm using Zabbix 3.4 at work (still need to upgrade it) with a MySQL 5.7 database. At home I have 4.0 with MariaDB 10.1. 

SQLite is probably fine for small scale, MySQL/MariaDB is able to handle much larger databases, queries and of course you can run a master/slave or master/master set up (be careful with master/master, it's quite easy to get a bunch of replication errors when you switch servers). 



Phishfry said:


> nginx for the web server is acceptable. Can I use any other web servers like lighttpd?


The web frontend is PHP. So if you can get that to work it should be fine. I mainly use Apache as that's the 'standard' web server at work any way.


----------



## Phishfry (Feb 22, 2019)

So agent is all that is needed on the monitored computer and the frontend and server is needed for monitoring.
Are there any standalone graphical applications for the server?
I want to output a dashboard to an HDMI monitor on the side of my rack.
Is it command line or web app only?
What does the Zabbix proxy I see in ports do?


----------



## SirDice (Feb 22, 2019)

Phishfry said:


> Are there any standalone graphical applications for the server?


No,  you only have the web GUI. That said, 4.0 (and I think 3.4 too) can log its data to elasticsearch. Once there you could use tools like Kibana and Grafana. 



Phishfry said:


> I want to output a dashboard to an HDMI monitor on the side of my rack.


The web GUI has a fairly easy API too, you can create a custom webpage with only the data you need/want. Within Zabbix itself you can also create your own dashboards. 



Phishfry said:


> What does the Zabbix proxy I see in ports do?


You can use it to monitor remote networks. All agents on the remote site log to the proxy, proxy is connected to the server. Makes it easier and you don't have to allow each agent individually access to the server.


----------



## Phishfry (Feb 22, 2019)

It would be awesome to be able to see my APC temperature sensors remotely(without exposing the whole device to the world).

I also want to create a dashboard/stats relayed to Linode that is served up via lighttp.
Isolated from my home network is the plan. Stats-only no widgets.
So the proxy sounds like a good place to start to read.
The master-master situ you spoke of only pretains to the database correct?
On Linode I would need another Zabbix server correct? To monitor the home network and its Zabbix server.


----------



## Phishfry (Feb 22, 2019)

Looking at these instructions:
https://www.techrepublic.com/article/how-to-connect-a-new-host-to-zabbix-monitoring-server/
On Linode I would run a Zabbix server and on my home network Zabbix server I would also run a Zabbix agent -for the Linode Zabbix server to monitor-.

Does that sound right?


----------



## SirDice (Feb 22, 2019)

My Zabbix server at home also monitors my VPS. I took the easy route and simply firewalled the server/agent connections so only connections from home are accepted on my VPS. The agent itself is also configured to only accept connections from my home address. That's done with the `Server` and `ServerActive` settings in zabbix_agentd.conf.


----------

