Skip to content

Commit

Permalink
added light/dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Trikke76 committed Dec 8, 2023
1 parent 5fa3cfc commit 95df5a4
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 80 deletions.
Binary file removed .mkdocs.yml.swp
Binary file not shown.
11 changes: 5 additions & 6 deletions docs/installation/Requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ or if the service is not known

```# firewall-cmd --add-port=10051/tcp --permanent```

???+ note
Firewalld is the replacement of iptables in Redhat and allows us to make changes available immediately without the need to restart a service. It's possible that your distribution is not using [Firewalld](https://www.firewalld.org) in this case you have to look to the documentation of your OS.

??? note " Firewalld is the replacement of iptables in Redhat and allows us to make changes available immediately without the need to restart a service. It's possible that your distribution is not using [Firewalld](https://www.firewalld.org) in this case you have to look to the documentation of your OS."

### timeserver

Expand All @@ -33,8 +33,7 @@ Chrony should be installed now and enabled and running. This can be verified wit

```# systemctl status chronyd```

???+ note
dnf is a packagemanager from RedHat you need to replace dnf with your correct packagemanager like zyper, apt, yum, ... chrony is a replacement for ntpd and does a better job being faster and more accurate. If your OS does not support [chrony](https://chrony-project.org/) then maybe ntpd is still available.
??? note "dnf is a packagemanager from RedHat you need to replace dnf with your correct packagemanager like zyper, apt, yum, ... chrony is a replacement for ntpd and does a better job being faster and more accurate. If your OS does not support [chrony](https://chrony-project.org/) then maybe ntpd is still available."


Once Chrony is installed we also need to setup our correct time zone. We can have a look first with 'timedatectl' to see how our time is configured
Expand Down Expand Up @@ -86,8 +85,8 @@ System clock synchronized: yes
NTP service: active
RTC in local TZ: no
```
???+ note
Some people like to install all servers in the UTC time zone so that all server logs are in the same time zone when having servers all over the world. Zabbix supports user based time zone settings so it's possible to keep the time zone in UTC on the server and then add the correct time zone in the user interface if you like.

??? note "Some people like to install all servers in the UTC time zone so that all server logs are in the same time zone when having servers all over the world. Zabbix supports user based time zone settings so it's possible to keep the time zone in UTC on the server and then add the correct time zone in the user interface if you like."


We can test if Chrony is syncronizing with the correct timeservers as well by running the command chronyc
Expand Down
56 changes: 14 additions & 42 deletions docs/installation/installing-zabbix.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,7 @@ MariaDB [(none)]> QUIT
```

???+ warning
The Zabbix documentation explicitly mentions that deterministic triggers need to be created during the import of schema. On MySQL and MariaDB, this requires GLOBAL log_bin_trust_function_creators = 1 to be set if binary logging is enabled and there is no superuser privileges and log_bin_trust_function_creators = 1 is not set in MySQL configuration file.
??? warning "The Zabbix documentation explicitly mentions that deterministic triggers need to be created during the import of schema. On MySQL and MariaDB, this requires GLOBAL log_bin_trust_function_creators = 1 to be set if binary logging is enabled and there is no superuser privileges and log_bin_trust_function_creators = 1 is not set in MySQL configuration file."


#### Add the Zabbix repository and populate the DB
Expand All @@ -204,8 +203,7 @@ Upload the data from zabbix (db structure, images, user, ... )
# zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uroot -p zabbix
```

???+ warning
Depending on the speed of your hardware or VM this can take a few seconds upto a few minutes so please don't cancel just sit and wait for the prompt
??? warning "Depending on the speed of your hardware or VM this can take a few seconds upto a few minutes so please don't cancel just sit and wait for the prompt."

Log back into your MariaDB Database as root

Expand Down Expand Up @@ -301,8 +299,7 @@ Run the following command to install the MySQL repo for version 8.0

```# dnf -y install https://dev.mysql.com/get/mysql80-community-release-el9-1.noarch.rpm```

???+ Note
If you install this on RedHat 8 and higher or alternatives like CentOS, Rocky or Alma 8 then you need to disable the mysql module by running 'module disable mysql'.
??? note "If you install this on RedHat 8 and higher or alternatives like CentOS, Rocky or Alma 8 then you need to disable the mysql module by running 'module disable mysql'."

Let's update our OS first with the latest patches

Expand Down Expand Up @@ -362,8 +359,7 @@ mysql> quit
```
Next we can run the command mysql_secure_installation, you should get the following output:

???+ Note
There is no need to reset the root password for MySQL again as we have reset it already. The next step is optional but recommended.
??? note "There is no need to reset the root password for MySQL again as we have reset it already. The next step is optional but recommended."

```
# mysql_secure_installation
Expand Down Expand Up @@ -433,15 +429,15 @@ mysql> SET GLOBAL log_bin_trust_function_creators = 1;
mysql> QUIT
```

???+ warning
The Zabbix documentation explicitly mentions that deterministic triggers need to be created during the import of schema. On MySQL and MariaDB, this requires GLOBAL log_bin_trust_function_creators = 1 to be set if binary logging is enabled and there is no superuser privileges and log_bin_trust_function_creators = 1 is not set in MySQL configuration file.
??? warning "The Zabbix documentation explicitly mentions that deterministic triggers need to be created during the import of schema. On MySQL and MariaDB, this requires GLOBAL log_bin_trust_function_creators = 1 to be set if binary logging is enabled and there is no superuser privileges and log_bin_trust_function_creators = 1 is not set in MySQL configuration file."

#### Add the Zabbix repository and populate the DB

```
# rpm -Uvh https://repo.zabbix.com/zabbix/6.5/rocky/9/x86_64/zabbix-release-6.5-2.el9.noarch.rpm
# dnf clean all
# dnf install zabbix-sql-scripts
```
Now let;s upload the data from zabbix (db structure, images, user, ... )

Expand All @@ -450,8 +446,7 @@ Now let;s upload the data from zabbix (db structure, images, user, ... )
Enter password:
```

???+ warning
Depending on the speed of your hardware or VM this can take a few seconds upto a few minutes so please don't cancel just sit and wait for the prompt.
??? warning "Depending on the speed of your hardware or VM this can take a few seconds upto a few minutes so please don't cancel just sit and wait for the prompt."

```
Log back into your MySQL Database as root
Expand Down Expand Up @@ -564,8 +559,7 @@ sudo systemctl enable postgresql-16 --now

As i told you PostgreSQL works a bit different then MySQL or MariaDB and this applies aswell to how we manage access permissions. Postgres works with a file with the name pg_hba.conf where we have to tell who can access our database from where and what encryption is used for the password. So let's edit this file to allow our frontend and zabbix server to access the database.

???+ note
Client authentication is configured by a configuration file with the name ```pg_hba.conf```. HBA here stands for host based authentication. For more information feel free to check the [PostgreSQL documentation](https://www.postgresql.org/docs/current/auth-pg-hba-conf.html).
??? note "Client authentication is configured by a configuration file with the name ```pg_hba.conf```. HBA here stands for host based authentication. For more information feel free to check the [PostgreSQL documentation](https://www.postgresql.org/docs/current/auth-pg-hba-conf.html)."

Add the following lines, the order here is important.

Expand Down Expand Up @@ -656,8 +650,7 @@ zabbix=> SELECT session_user, current_user;

PostgreSQL works a bit different then MySQL or MariaDB when it comes to almost everything :) One of the things that it has that MySQL not has are for example shemas. If you like to know more about it i can recommend [this](https://hevodata.com/learn/postgresql-schema/#schema) URI. It explains in detail what it is and why we need it. But in short ... In PostgreSQL schema enables a multi-user environment that allows multiple users to access the same database without interference. Schemas are important when several users use the application and access the database in their way or when various applications utilize the same database. There is a standard schema that you can use but the better way is to create our own schema.

???+ Note
There is a standard schema ```public``` that you can use but the better way is to create our own schema this was if later something else is installed next to the Zabbix database it will be easier to create users with only access to the newly created database tables.
??? note "There is a standard schema ```public``` that you can use but the better way is to create our own schema this was if later something else is installed next to the Zabbix database it will be easier to create users with only access to the newly created database tables."

```
zabbix=> CREATE SCHEMA zabbix_server AUTHORIZATION "zabbix-srv";
Expand Down Expand Up @@ -695,8 +688,7 @@ We are now ready to populate the database with the Zabbix table structures etc .

Let's upload the Zabbix SQL file we extracted earlier to populate our database with the needed schemas images users etc ...

???+ warning
Depending on the speed of your hardware or VM this can take a few seconds upto a few minutes so please don't cancel just sit and wait for the prompt.
??? warning "Depending on the speed of your hardware or VM this can take a few seconds upto a few minutes so please don't cancel just sit and wait for the prompt."


```
Expand All @@ -713,8 +705,7 @@ COMMIT
zabbix=#
```

???+ note
If the import fails with ```psql:/usr/share/zabbix-sql-scripts/postgresql/server.sql:7: ERROR: no schema has been selected to create in``` then you probably made an error in the line where you set the search path.
??? note "If the import fails with ```psql:/usr/share/zabbix-sql-scripts/postgresql/server.sql:7: ERROR: no schema has been selected to create in``` then you probably made an error in the line where you set the search path."

Lets verify that our tables are properly created with the correct permissions

Expand All @@ -737,8 +728,9 @@ zabbix=# \dt
zabbix_server | widget_field | table | zabbix-srv
(173 rows)
```
???+ Note
If you are like me and don't like to set the search path every time you logon with the user zabbix-srv to the correct search path you can run the following SQL. ```zabbix=> alter role "zabbix-srv" set search_path = "$user", public, zabbix_server ;```

??? note "If you are like me and don't like to set the search path every time you logon with the user zabbix-srv to the correct search path you can run the following SQL. ```zabbix=> alter role "zabbix-srv" set search_path = "$user", public, zabbix_server ;```"


If you are ready you can exit the database and return as user root.

Expand Down Expand Up @@ -817,26 +809,6 @@ Our database server is ready now to accept connections from our Zabbix server :)
You can continue with the next task [Installing the Zabbix Server](#installing-the-zabbix-server)























### Setting up Zabbix HA

Expand Down
24 changes: 18 additions & 6 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,32 @@ nav:
- 15-Zabbix API.md

theme:
language: en
name: material
font:
text: IBM Plex Sans
code: IBM Plex Mono
text: Roboto
code: Roboto Mono
icon:
logo: material/library
features:
# - navigation.tabs
# - navigation.tabs
- navigation.sections
- navigation.instant
- navigation.expand
palette:
scheme: default
primary: blue
accent: blue
- scheme: default
primary: blue
accent: blue
toggle:
icon: material/toggle-switch-off-outline
name: Switch to dark mode
- scheme: slate
primary: light blue
accent: light blue
toggle:
icon: material/toggle-switch
name: Switch to light mode


# Plugins
plugins:
Expand Down
2 changes: 1 addition & 1 deletion site/search/search_index.json

Large diffs are not rendered by default.

50 changes: 25 additions & 25 deletions site/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,127 +2,127 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://trikke76.github.io/Zabbix-Book/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/05-Managing%20Permissions/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/06-Visualising%20our%20problems/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/07-Automating%20configuration/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/08-VMWare%20monitoring/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/09-Monitoring%20websites/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/10-Monitoring%20SNMP%2CIPMI%20and%20JAVA/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/11-Monitoring%20with%20Proxies/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/12-Securing%20Zabbix/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/13-Maintaining%20Zabbix/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/14-Monitoring%20Windows/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/15-Zabbix%20API/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/actions/zabbix-eventactions/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/configuration/Dashboard/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/configuration/zabbix-agent/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/configuration/zabbix-dataflow/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/configuration/zabbix-hostgroups/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/configuration/zabbix-hosts/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/configuration/zabbix-interfaces/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/configuration/zabbix-items/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/configuration/zabbix-macros/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/configuration/zabbix-users/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/installation/Requirements/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/installation/installing-zabbix/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://trikke76.github.io/Zabbix-Book/problems/zabbix-triggers/</loc>
<lastmod>2023-12-07</lastmod>
<lastmod>2023-12-08</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>
Binary file modified site/sitemap.xml.gz
Binary file not shown.
Binary file modified zabbix-7-book.pdf
Binary file not shown.

0 comments on commit 95df5a4

Please sign in to comment.