Basic item configuration
We rushed through the configuration of our simple item, so you might have gotten curious about the parameters we didn't change or talk about. Let's take a quick look at what can be monitored and what we can configure for each item.
Zabbix can monitor quite a wide range of system characteristics. Functionally, we can split them into categories, while technically, each method used corresponds to an item type.
Monitoring categories
Let's take a look at the generic categories that we can keep an eye on. Of course, this is not an exhaustive list of things to monitor—consider this as an example subset of interesting parameters. You'll soon discover many more areas to add in your Zabbix configuration.
Availability
While the simplified example we started with (the unlucky administrator in a party—remember him?) might not frighten many, there are more nightmare scenarios available than we'd want to think about. Various services can die without a sign until it's too late, and a single memory leak can bring the system down easily.
We'll try to explore the available options for making sure such situations are detected as early as possible in order to, say, help our administrator deal with disk space problems during the working day and find out that an important service has died because of a database hiccup just as he goes through the door.
Performance
Performance is one of several holy grails in computing. Systems are never fast enough to accommodate all needs, so we have to balance desired operations with available resources. Zabbix can help you both with evaluating the performance of a particular action and monitoring the current load.
You can start with simple things, such as network performance, indicated by a ping roundtrip or the time it takes for a website to return content, and move forward with more complex scenarios, such as the average performance of a service in a cluster coupled with the disk array throughput.
Security
Another holy grail in computing is security, a never-ending process where you are expected to use many tools, one of which can be Zabbix.
Zabbix can, independently of other verification systems, check simple things such as open ports, software versions, and file checksums. While these would be laughable as the only security measures, they can turn out to be quite valuable additions to existing processes.
Management
System management involves doing many things, and that means following a certain set of rules in all of those steps. Good system administrators never fail at that, except when they do.
There are many simple and advanced checks you can use to inform you about tasks to perform or problems that arise when configuring systems: cross-platform notifications about available upgrades, checking whether the DNS serial number has been updated correctly, and a myriad of other system-management pitfalls.
Efficiency
While generally considered a subset of availability or performance, some aspects of efficiency do not quite fit in there. Efficiency could be considered the first step to improved availability and performance, which increases the importance of knowing how efficient your systems are.
Efficiency parameters will be more service-specific than others, but some generic examples might include Squid hit ratios and MySQL query cache efficiency. Other applications, including custom in-house ones, might provide other efficiency-measuring methods.
Item types
As explored before, Zabbix gathers all its data within items. But surely, we'll want to get information in more ways than just through the Zabbix agent. What are our options? Let's have a look:
This is the item type configuration dropdown when editing an item. We pretty much skipped this selection when creating our item because the default value suited us. Let's take a quick look at the types available now:
- Zabbix agent: This is the default type. The server connects to the agent and gathers data.
- Zabbix agent (active): This can be considered as the opposite of the previous type. The Zabbix agent gathers data and connects to the server as required.
- Simple check: As the name implies, this type groups simple checks that are performed by server. This includes checking for open TCP ports, ICMP ping, and so on. We will discuss both Zabbix agent types and simple checks in Chapter 3, Monitoring with Zabbix Agents and Basic Protocols.
- SNMP agents: These three types deal with gathering SNMP data. Versions, obviously, denote the protocol version to use when connecting to the monitored host.
- SNMP trap: While still relying on Net-SNMP's
snmptrapd
to obtain traps from the network, Zabbix offers the functionality of receiving SNMP traps easily. This item type allows you to do that, including automatic sorting per host. We will cover SNMP polling and trapping in Chapter 4, Monitoring SNMP Devices. - Zabbix internal: This groups items that gather information about the internal state of Zabbix. We will discuss the internal monitoring in Chapter 3, Monitoring with Zabbix Agents and Basic Protocols.
- Zabbix trapper: This item type accepts incoming data instead of querying for it. It is useful for any data you might want to feed into Zabbix that is obtained using other tools, customs scripts, or any other method.
- Zabbix aggregate: These items aggregate values across a host group. This is mostly useful for clusters or server farms where the overall state is more important than the state of individual machines.
- External check: External checks allow the Zabbix server to execute external commands and store the returned values in the item. This allows it to pass along any information that isn't accessible using any of the other item types. We will use Zabbix trapper items, aggregate items, and external checks in Chapter 11, Advanced Item Monitoring.
- Database monitor: This type includes built-in native checks for querying various database parameters.
- IPMI agent: The Intelligent Platform Management Interface (IPMI) is a specification for managing and monitoring (which we're mostly after) systems, especially for out-of-band solutions. The IPMI item type allows direct access to this data. We will cover IPMI monitoring in Chapter 16, Monitoring IPMI Devices.
- SSH agent: It is possible to directly query a host with SSH and retrieve shell-command output. This check supports both password and key-based authentication.
- TELNET agent: For some systems where SSH is unavailable, direct a Telnet check can be used. While insecure, it might be the only way to access some devices, including older-generation switches or UPSes. We will discuss SSH and Telnet items in items in Chapter 11, Advanced Item Monitoring.
- JMX agent: Zabbix provides a component called the Zabbix Java gateway. It allows you to monitor JMX-capable applications directly. JMX monitoring will be discussed in Chapter 17, Monitoring Java Applications.
- Calculated: These are advanced items that allow you to create new values from other, pre-existing Zabbix items without duplicate data retrieval. We will use these items in Chapter 11, Advanced Item Monitoring.
While all these types might look a bit confusing at this point, an important thing to remember is that they are available for your use, but you don't have to use them. You can have a host with a single ICMP ping item, but if you want to monitor more, the advanced functionality will always be there.
As you might have noticed, the item type is set per individual item, not per host. This allows great flexibility when setting up monitored hosts. For example, you can use ICMP to check general availability, a Zabbix agent to check the status of some services and simple TCP checks for others, a trapper to receive custom data, and IPMI to monitor parameters through the management adapter—all on the same host. The choice of item type will depend on network connectivity, the feature set of the monitored host, and the ease of implementation. Zabbix will allow you to choose the best fit for each item.
How items can be monitored
While that covered categories and item types, we skipped some other parameters when creating the item, so it might be helpful to learn about basic values that will have to be set for most item types. Let's take a quick look at the fields in the item creation/editing window:
- Name: A user-level item name. This is what you will see in most places where data is shown to users.
- Type: This is the main property, affecting other fields and the way item data is gathered, as discussed previously.
- Key: This is the property that explicitly specifies what data has to be gathered for this item. It is sort of a technical name for the item. The key value must be unique per host. For certain other item types, the field that is actually identifying collected data might be Simple Network Management Protocol Object Identifiers (SNMP OID) or IPMI sensor, and the key will be only used to reference the item.
- Type of information: This allows you to choose the data type that will be gathered with the item. You'll have to set it according to the values provided: integers, decimals, and so on.
- Data type : This property provides a way to query data in hexadecimal or octal format and convert it to decimal values automatically. Some SNMP-capable devices (mostly printers) send information in these formats. There's also the Boolean data type that converts several inputs to 1 or 0.
- Units: This property allows you to choose the unit to be displayed besides data, and for some units, Zabbix will calculate corresponding conversions as required (called "human-readable" in many tools, so you get 32.5 GB instead of the same value in bytes).
- Use custom multiplier: This property multiplies incoming data with the value specified here and stores the result. This is useful if data arrives in one unit but you want to store it as another (for example, if the incoming data is in bytes but you want it in bits, you'd use a multiplier of 8).
- Update interval: This sets the interval between data retrieval attempts.
- Custom intervals: This setting allows you to modify the update interval during specific times or use cron-like item scheduling—either because you have no need for a particular item during the night or because you know some particular service will be down, for example, during a backup window.
- History storage period: This sets the time period for which actual retrieved values are stored in the database.
- Trend storage period: This does the same as the History storage period option, but for trends. Trends are data calculated from history and averaged for every hour to reduce long-term storage requirements.
- Store value: This property is for numeric data only and allows the Zabbix server to perform some basic calculations on the data before inserting it into the database, such as calculating the difference between two checks for counter items.
- Show value: In this dropdown, a value map may be selected. It allows you to show human-readable values for numeric codes, for example, as returned by the SNMP interface status. Refer to Chapter 3, Monitoring with Zabbix Agents and Basic Protocols, for more information on value mapping.
- Applications: This property makes it possible to perform logical grouping of items, for example, on the Monitoring | Latest data screen.
- Populates host inventory field: Allows you to place collected item values in an inventory field (explored in Chapter 5, Managing Hosts, Users and Permissions).
- Description: This field, available for several entities in Zabbix 3.0, allows you to describe an item. You may explain the way data is collected, manipulated, or what it means.
- Enabled: This allows you to enable or disable the item.
Don't worry if these short descriptions didn't answer all of your questions about each option. We'll dig deeper into each of these later, and there are more options available for other item types as well.