Creating your first users
With our newly created user groups and user roles, we’ve taken our first step toward a more structured and secure Zabbix setup. The next step is to actually assign some users to the newly created user groups to make sure they are assigned our new user permissions from the group, as well as making them part of a user role to provide the correct access to UI elements.
Getting ready
To get started, we’ll need the server and the newly created user groups from the last recipe. So, let’s start with the configuration.
We know there are three departments in the Cloud Hoster company that are going to use our Zabbix installation. We’ve created user groups for them, but there are also users in those departments that actually want to use our installation. Let’s meet them:
Figure 2.15 – Cloud Hoster users diagram
These are the users we need to configure for Cloud Hoster to use.
How to do it…
Let’s start creating the users. We will start with our Networking department:
- Navigate to Users | Users, which will bring us to this page:
Figure 2.16 – The Zabbix Users window
- This is where all the user creation magic is happening, as we will be managing all of our users from this page. To create our first Networking department user named
s_network
, click the Create user button in the top-right corner, bringing us to the following screen:
Figure 2.17 – The Zabbix Users configuration window
- Fill out the Username field to provide us with the username this user will have, which will be
s_network
. - Also, it’s important to add this user to the group we have just created to give our user the right permissions. Click Select and pick our group called Networking.
- Last but not least, set a secure password in the Password fields; don’t forget it because we will be using it later.
- After this, move on to the Permissions tab as we won’t be configuring Media just yet:
Figure 2.18 – The Zabbix user Permissions configuration window
- Select the Role option named Super admin role here. This will enable our user to access all UI elements and see and edit information about all host groups in the Zabbix server.
The following user roles are available in Zabbix by default:
Default roles
Description
User role
The Zabbix User role has access to the visualization aspects of our Zabbix environment. Specifically, the Monitoring, Services, and Inventory and Reporting menus are available. The user will only ever have READ access to templates and hosts and they must be explicitly assigned.
Admin role
The Zabbix Admin role can additionally manage the configuration of our Zabbix monitoring. Specifically, all the menus that the Zabbix User has access to are available, with the addition of Data collection and Alerts. The user can be assigned READ-WRITE access to templates and hosts and they must be explicitly assigned.
Super admin role
The Zabbix Super admin role has access to the administrative aspects of our Zabbix environment. Specifically, all the menus that the Zabbix Admin has access to are available, with the addition of Users and Administration. The user will always have READ-WRITE access to all templates and hosts.
8. Let’s repeat the previous steps for the user named y_network
, but in the Permissions tab, select the Admin role option as follows:
Figure 2.19 – The Zabbix user Permissions configuration window
After creating these two users, let’s move on to create the infrastructure user, r_ infra
. Repeat the steps we took for s_network
, changing the Username, of course. Then, add this user to the group and give our user the right permissions. Click Select and pick our group called Infrastructure. It will look as follows:
Figure 2.20 – The Zabbix user configuration window for r_infra
Lastly, make this user another Super admin on the Permissions page.
9. Now, for our last user, let’s repeat our steps, changing the Username and the group in the User tab as follows:
Figure 2.21 – The Zabbix User configuration window for e_buy
10. If you didn’t follow the previous recipe, you can change this user’s Role to User role
at the Permissions tab. But if you did follow the previous recipe, we can use the User+ role
we created as follows:
Figure 2.22 – The Zabbix user configuration window for e_buy
Setting the user up with the User+
role will also let the e_buy
user create maintenance periods.
When you’re done, you’ll end up with the following:
s_network
: A user with access to the Networking user group permissions with the Super admin roley_network
: A user with access to the Networking user group permissions with the Admin roler_infra
: A user with access to the Infrastructure user group permissions with the Super admin rolee_buy
: A user with access to the Buying and Inventory user group permissions with either theUser
role or theUser+ role