Oh, hey, thanks for sticking around. Zabbix is a big, and rather complicated beast. I could write a book about it, and I’m sure others have already done it, lol.
If you missed the first two parts to the guide, I’d definitely recommend starting at the beginning: Zabbix Guide Part 1
Starting to find some puzzle pieces
So now that we have our server up and running, and our gui seured from prankster coworkers, we can get down to the real business.
If you haven’t, I’d suggest taking a few minutes to poke around in the GUI and get comfortable navigating around… You’re done? Already. Wow, you’re good.
We’re going to be installing agents on the server and remote system after we get a few things set up here.
Zabbix can do a few automated things for us when an Agent calls home to the server, the server checks to see if that machine has checked in before, or not.
If it hasn’t, we can tell Zabbix to do a few things for us, such as assign templates, and many other useful things. I’m going to focus on something basic though. Determining the OS of the Agent that is calling, and assigning a template to it. Zabbix calls this an Action.
Piece # 1: The Actions
To find these “Actions”, we need to go to Configuration -> Actions
In the Event Source drop down (to the left of the ‘Create Action’ button), we need to change the Event Source to “Auto Registration”.
After the page reloads, then we can click the “Create Action” button.
You’ll see now that we’re on the “Actions” tab (it’s underlined in blue). For autoregistration, all we need to do on this tab is give it a name. Since this is going to be for Windows, I’ll call it Windows Registration, and then click on the ‘Conditions’ tab. You’ll see in the image below, I’ve got the ‘Add link’ highlighted. Any time I talk about a ‘link’, it will look similar to this add link. You’ll notice below the Add link, an Add button. They are two separate things.
You’ll notice in the image above, a drop down box labeled ‘New Condition’… Change the value in that dropdown to ‘Host metadata’, set the second drop down box to ‘like’, and in the text box beside it, type in ‘Windows’ without the quotes and then click the Add link.
When done correctly, your screen should appear similar to the image above. We’re not quite done yet, though. Now that we have it set to look for “Windows”, now we can tell it what to do… That’s on the Operations tab. Once on the Operations tab, click the “New” link, and then set the Operation Type drop down to ‘Add Host’, then click the Add link.
Next up, we’ll hit the ‘New’ link again, and then set the Operation type to Add Host to Group. There’s already a group called Discovered Hosts, so we’ll use that one for now. Just start typing in the text box ane click ‘Discovered Hosts’ when it comes up. Click the Add link once again. Then, guess what’s next? Click the New link again. this time, we’ll set the operation type to Link to Template. Assuming that you’re following along with me and doing windows, just like in the previous entry, start typing Windows, and you’ll see an option that says Template OS Windows. Click that one, and then click the Add link again.
If your screen looks similar to the above, we should be good to go. Just click the blue Add button to save this action. It should return you to the Actions page where you will now see your action and the options you chose. I’ll leave adding a Linux action to the reader. [pro tip: Just go back through these same steps and replace Windows with Linux, and you should be good. :-) ]
Once you’re done, your screen should look something like:
So… That’s our first major piece of the puzzle. In Part 4, we’ll take a look at the OS and Windows templates.