So I'm trying to setup timescaledb on my new zabbix installation:
Zabbix 7.0 > Ubuntu > 24.04 > Server > postgresql > nginx
I can't find anything online for this specific combination regarding zabbix7+timescaledb - Only RHEL-Based guides out there.
From:
The steps are:
1A. tee /etc/yum.repos.d/timescale_timescaledb.repo <<EOL
[timescale_timescaledb]
name=timescale_timescaledb
baseurl=https://packagecloud.io/timescale/timescaledb/el/$(rpm -E %{rhel})/\$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/timescale/timescaledb/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
EOL
2A. dnf install timescaledb-2-postgresql-16 timescaledb-2-loader-postgresql-16
3A. timescaledb-tune --pg-config /usr/pgsql-16/bin --max-conns=125
4A. systemctl restart postgresql-16.service
5A. echo "CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;" | sudo -u postgres psql zabbix
cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb/schema.sql | sudo -u zabbix psql zabbix
From what I've gathered for Ubuntu the steps should be something like:
1B. echo "deb https://packagecloud.io/timescale/timescaledb/ubuntu/ $(lsb_release -c -s) main" | sudo tee /etc/apt/sources.list.d/timescaledb.list
2B. wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/timescaledb.gpg
3B. sudo apt update
4B. sudo apt install timescaledb-2-postgresql-16 postgresql-client-16
5B. sudo timescaledb-tune
6B. sudo systemctl restart postgresql
7B. echo "CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;" | sudo -u postgres psql zabbix
cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb/schema.sql | sudo -u zabbix psql zabbix
According to the lines above:
- Are lines 1B+2B sufficient? The 1A part has a few extra stuff within it which 1B+2B does not.
- Line 2A has "timescaledb-2-loader-postgresql-16" while 4B comes with "postgresql-client-16". Which should it be?
- Should I change 5B to be the same as 3A? (should I add "--pg-config /usr/pgsql-16/bin --max-conns=125" to the end of that line)
I hope my questions aren't too confusing. I'm just trying to implement Timescaledb to an Ubuntu installation (with best practice if possible). If there is anything else I need to know/change please do inform.
Thanks!
Zabbix 7.0 > Ubuntu > 24.04 > Server > postgresql > nginx
I can't find anything online for this specific combination regarding zabbix7+timescaledb - Only RHEL-Based guides out there.
From:
The steps are:
1A. tee /etc/yum.repos.d/timescale_timescaledb.repo <<EOL
[timescale_timescaledb]
name=timescale_timescaledb
baseurl=https://packagecloud.io/timescale/timescaledb/el/$(rpm -E %{rhel})/\$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/timescale/timescaledb/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
EOL
2A. dnf install timescaledb-2-postgresql-16 timescaledb-2-loader-postgresql-16
3A. timescaledb-tune --pg-config /usr/pgsql-16/bin --max-conns=125
4A. systemctl restart postgresql-16.service
5A. echo "CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;" | sudo -u postgres psql zabbix
cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb/schema.sql | sudo -u zabbix psql zabbix
From what I've gathered for Ubuntu the steps should be something like:
1B. echo "deb https://packagecloud.io/timescale/timescaledb/ubuntu/ $(lsb_release -c -s) main" | sudo tee /etc/apt/sources.list.d/timescaledb.list
2B. wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/timescaledb.gpg
3B. sudo apt update
4B. sudo apt install timescaledb-2-postgresql-16 postgresql-client-16
5B. sudo timescaledb-tune
6B. sudo systemctl restart postgresql
7B. echo "CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;" | sudo -u postgres psql zabbix
cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb/schema.sql | sudo -u zabbix psql zabbix
According to the lines above:
- Are lines 1B+2B sufficient? The 1A part has a few extra stuff within it which 1B+2B does not.
- Line 2A has "timescaledb-2-loader-postgresql-16" while 4B comes with "postgresql-client-16". Which should it be?
- Should I change 5B to be the same as 3A? (should I add "--pg-config /usr/pgsql-16/bin --max-conns=125" to the end of that line)
I hope my questions aren't too confusing. I'm just trying to implement Timescaledb to an Ubuntu installation (with best practice if possible). If there is anything else I need to know/change please do inform.
Thanks!
Comment