You can also create an item by opening an existing one, pressing the Clone button and then saving under a different name. Text data limits depend on the database backend. Before storing text values in the database they get truncated to match the database value type limit:.

By default, specifying a unit for an item will result in a multiplier prefix being added - for example, value with unit B would be displayed as 2KB.

Zabbix agent User Parameters explained

For a pre-defined, hardcoded list of units this is prevented:. Note that both lowercase and uppercase rpm rpm and RPM strings are blacklisted. An item can become unsupported if its value cannot be retrieved for some reason. Such items are still rechecked at a fixed interval, configurable in Administration section.

User Tools Log In. Site Tools Search.

Botnet for sale

Sidebar Zabbix Manual. Zabbix manpages. Zabbix documentation in Russian. Table of Contents 1 Creating an item. Item attributes: Parameter Description Name This is how the item will be named. See individual item type sections. Key Item key up to characters. The supported item keys can be found in individual item type sections.

The key must be unique within a single host. If key type is 'Zabbix agent', 'Zabbix agent active ', 'Simple check' or 'Zabbix aggregate', the key value must be supported by Zabbix agent or Zabbix server. See also: the correct key format. Host interface Select the host interface. This field is available when editing an item on the host level.

Type of information Type of data as stored in the database after performing conversions, if any. Numeric unsigned - 64bit unsigned integer Numeric float - floating point number Negative values can be stored. Allowed range: Starting with Zabbix 2. Character - short text data Log - long text data with optional log related properties timestamp, source, severity, logeventid Text - long text data Limits of text data are described in the table below.

Data type Data type is used for integer items in order to specify the expected data type: Boolean - textual representation translated into either 0 or 1.

All values are matched in a case-insensitive way. Octal - data in octal format Decimal - data in decimal format Hexadecimal - data in hexadecimal format Zabbix will automatically perform the conversion to numeric.

The conversion is done by Zabbix server even when a host is monitored by Zabbix proxy. Units If a unit symbol is set, Zabbix will add post processing to the received value and display it with the set unit postfix. By default, if the raw value exceedsit is divided by and displayed accordingly. For example, if you set bps and receive a value ofit will be displayed as Special processing is used for B byteBps bytes per second units, which are divided by To translate correctly, the received value must be a Numeric unsigned type of information.

See also the unit blacklist. Use custom multiplier If you enable this option, all received values will be multiplied by the integer or floating-point value set in the value field. Otherwise Zabbix cannot correctly set prefixes K, M, G etc.It is possible to create custom rules regarding the times when an item is checked. The two methods for that are Flexible intervalswhich allow to redefine the default update interval, and Schedulingwhereby an item check can be executed at a specific time or sequence of times.

Flexible intervals allow to redefine the default update interval for specific time periods.

Custom Discovery: Discover All the Things!

A flexible interval is defined with Interval and Period where:. Up to seven flexible intervals can be defined. If multiple flexible intervals overlap, the smallest Interval value is used for the overlapping period. Note that if the smallest value of overlapping flexible intervals is '0', no polling will take place.

Outside the flexible intervals the default update interval is used. Note that if the flexible interval equals the length of the period, the item will be checked exactly once.

Aap ne call ki thi in english

If the flexible interval is greater than the period, the item might be checked once or it might not be checked at all thus such configuration is not advisable. If the flexible interval is less than the period, the item will be checked at least once. If the flexible interval is set to '0', the item is not polled during the flexible interval period and resumes polling according to the default Update interval once the period is over.

Scheduling intervals are used to check items at specific times. While flexible intervals are designed to redefine the default item update interval, the scheduling intervals are used to specify an independent checking schedule, which is executed in parallel. While the filter definitions are optional, at least one filter must be used.

An empty filter matches either '0' if no lower-level filter is defined or all possible values otherwise. For example, if the hour filter is omitted then only '0' hour will match, provided minute and seconds filters are omitted too, otherwise an empty hour filter will match all hour values. Single digit month days, hours, minutes and seconds values can be prefixed with 0.

If a time is matched by several intervals it is executed only once. For example, wd1h9;h9 will be executed only once on Monday at 9am. User Tools Log In. Site Tools Search. Sidebar Zabbix Manual. Zabbix manpages.You can also create an item by opening an existing one, pressing the Clone button and then saving under a different name. By default, specifying a unit for an item will result in a multiplier prefix being added - for example, value with unit B would be displayed as 2KB. For a pre-defined, hardcoded list of units this is prevented:.

Note that both lowercase and uppercase rpm rpm and RPM strings are blacklisted. An item can become unsupported if its value cannot be retrieved for some reason. Such items are still rechecked at a fixed interval, configurable in Administration section. User Tools Log In. Site Tools Search. Sidebar Zabbix Manual. Zabbix manpages. Zabbix documentation in Japanese. Zabbix documentation in Russian. Table of Contents 1 Creating an item. Item attributes: Parameter Description Host Select the host or template.

Name This is how the item will be named. See individual item type sections. Key Item key. The supported item keys can be found in individual item type sections.

Create your own items – extend the agent with userparameters

The key must be unique within a single host. If key type is 'Zabbix agent', 'Zabbix agent active ', 'Simple check' or 'Zabbix aggregate', the key value must be supported by Zabbix agent or Zabbix server. See also: the correct key format. Host interface Select the host interface. This field is available when editing an item on the host level. Type of information Type of data as stored in the database after performing conversions, if any.

Numeric unsigned - 64bit unsigned integer Numeric float - floating point number Negative values can be stored. Allowed range for MySQL : Character - character string data limited to bytes Log - log file. Text - text of unlimited size Data type Data type is used for integer items in order to specify the expected data type: Boolean - textual representation translated into either 0 or 1.

All values are matched in a case-insensitive way. Octal - data in octal format Decimal - data in decimal format Hexadecimal - data in hexadecimal format Zabbix will automatically perform the conversion to numeric. The conversion is done by Zabbix server even when a host is monitored by Zabbix proxy. Units If a unit symbol is set, Zabbix will add post processing to the received value and display it with the set unit postfix.

Oba ogboni

By default, if the raw value exceedsit is divided by and displayed accordingly. For example, if you set bps and receive a value ofit will be displayed as Special processing is used for B byteBps bytes per second units, which are divided by To translate correctly, the received value must be a Numeric unsigned type of information. See also the unit blacklist.

Use custom multiplier If you enable this option, all received values will be multiplied by the integer or floating-point value set in the value field. Otherwise Zabbix cannot correctly set prefixes K, M, G etc.You can also create an item by opening an existing one, pressing the Clone button and then saving under a different name.

Text data limits depend on the database backend. Before storing text values in the database they get truncated to match the database value type limit:. By default, specifying a unit for an item results in a multiplier prefix being added - for example, an incoming value '' with unit 'B' would be displayed as '2KB'. Any unit, however, can be prevented from being converted by using a!

To better illustrate how the conversion works with and without the blacklisting, see the following examples of values and units:. The Preprocessing tab allows to define transformation rules for the received values. One or several transformations are possible before saving values to the database. Transformations are executed in the order in which they are defined. Preprocessing is done either by Zabbix server or by Zabbix proxy for items monitored by proxy.

See also: Preprocessing details. User macros and user macros with context are supported in item value preprocessing parameters. If Zabbix server is restarted or there is any change to preprocessing steps the last value of the corresponding item is reset, resulting in:. Testing preprocessing steps is useful to make sure that complex preprocessing pipelines yield the results that are expected from them, without waiting for the item value to be received and preprocessed.

Each preprocessing step can be tested individually as well as all steps can be tested together. When you click on Test or Test all steps button respectively in the Actions block, a testing window is opened.

Test values are stored between test sessions for either individual steps or all steps, allowing user to change preprocessing steps or item configuration and then return to the testing window without having to re-enter information. Values are lost on a page refresh though. The testing is done by Zabbix server. The frontend sends a corresponding request to the server and waits for the result.

The request contains the input value and preprocessing steps with expanded user macros. For Change and Throttling steps, an optional previous value and time can be specified.Having out-grown the included Zabbix Web Interface templates, I find myself more often than not, having to create new templates as well as entirely new ways of monitoring hardware and software.

I often create custom discovery rules to dynamically create new items as services and devices change. The feature is described as follows by Zabbix:. Low-level discovery provides a way to automatically create items, triggers, and graphs for different entities on a computer. For instance, Zabbix can automatically start monitoring file systems or network interfaces on your machine, without the need to create items for each file system or network interface manually.

Additionally it is possible to configure Zabbix to remove unneeded entities automatically based on actual results of periodically performed discovery.

Item and Trigger prototypes then handles, based on the discovered data, creation of items and triggers.

Though with the agent and a little scripting, we can create our own Custom Discovery item keys! For the purposes of this guide, we will try to discover all files within a directory and then via prototypes, create items that read information from these files. The path is hard-coded inside the Zabbix Agent configuration. Detailed information about the item key is available here. The content of our files is:. The first parameter is the file path of the file we wish to retrieve data from.

As added or removed, Zabbix will create or remove items by itself! Now, which files and what data are inside them, is entirely up to you. Many types of software create status files. You can also create a small script that pulls data from the software and populates one or more files with the information. Depending on how you end up formatting the files, you have to also edit your regular expression to find the values correctly.

zabbix custom items

Published in Guides. Is there is a way to make multiple triggers for 1 item? I want to make 1 item prototype and 1 trigger prototype. Hi Sergey. Thanks for your sharing. This is a helpful guide. I have a question. Is there a way to set item prototype to update data 1 time only? I created a discovery rule to get a list of data file, and a item prototype to show content of file.

As these data files are not updatedso I want the item prototype to collect and show them 1 time only. Items in Zabbix are meant to be updated on a schedule, but what you can do is set a very high interval between checks.

In Zabbix 3. Is there any way to show up data once item is created? Upon item discovery and creation, Zabbix schedules a check according to the chosen Update interval. The only way to currently circumvent this behaviour, is to create the items with a low Update interval, such as 1m or 10m, and then up the Update interval to the original desired value.

Base on your great ideal, I set up the low Update interval to 1m, then create the script to check and update directly in zabbix database to 1d. Just a little inconvenience, sometime the item got data 2 times before my script run the db update.

Your email address will not be published. Check here to Subscribe to notifications for new posts.Zabbix also provides a monitoring agent, which has a great set of built-in items for monitoring diskspace, processes, memory usage and many other things. While the list of built-in items is growing with each release, there will always be something else we will want to monitor.

Luckily, Zabbix agent is very easy to extend with new items by using a feature called userparameters. Zabbix userparameters are commands that the agent runs and expects an item value to be returned.

Agent has a lot more supported — there are about 80 built-in keys, many supporting several parameters to gather even more various detail. We will look at the following examples in this article:. On a system with Zabbix agent daemon installed, edit its configuration file and add the following line:.

zabbix custom items

Restart the Zabbix agent after adding this line. Any changes in the agent configuration file require a restart of the agent. Userparameter syntax is simple:. After the configuration file parameter called UserParameter and an equal sign follows an item key.

As we are making a custom item, we come up with this key ourselves. Then, separated by a comma, follows the command that will be executed when this item key will be queried. This should return 1. Notice how this new custom item looks like any other item from the server side — it could be a new agent version implementing a new built-in item, server would have no idea.

On email servers, received but not yet delivered emails pile up in a queue. This queue getting too long indicates some problem.

zabbix custom items

Luckily, we can easily monitor the mail queue with the mailq command. When there are messages, it looks like this:. We could get the number of the queued messages by grabbing the lines that start with a number or an uppercase letter the -c parameter for grep tells it to return the count of matched lines :. Our previous command would perceive this as a single message. We could expand the command to exclude this status message:. If we take a close look at the mail queue IDs in the output the alpha-numeric strings for each mailwe will notice that the letters in them do not pass F — it is not just a plain alpha-numeric string but a hex number string.

Thus we can simplify our command to:. With this knowledge in hand, we can add a new userparameter in the agent daemon configuration file:. While some versions of mailq return the number of entries at the end of the output, not all of them do — and the format differs.

Counting the mail queue IDs is a more portable solution. We could get the ownership information from ls :. Parsing that is an extra effort, though.You can also create an item by opening an existing one, pressing the Clone button and then saving under a different name.

Text data limits depend on the database backend. Before storing text values in the database they get truncated to match the database value type limit:. By default, specifying a unit for an item results in a multiplier prefix being added - for example, an incoming value '' with unit 'B' would be displayed as '2KB'.

Ling ko aurat kochusna hai

Any unit, however, can be prevented from being converted by using a! To better illustrate how the conversion works with and without the blacklisting, see the following examples of values and units:. The Preprocessing tab allows to define transformation rules for the received values.

One or several transformations are possible before saving values to the database. Transformations are executed in the order in which they are defined. Preprocessing is done either by Zabbix server or by Zabbix proxy for items monitored by proxy. User macros and user macros with context are supported in item value preprocessing parameters.

zabbix custom items

If Zabbix server is restarted or there is any change to preprocessing steps the last value of the corresponding item is reset, resulting in:. Testing preprocessing steps is useful to make sure that complex preprocessing pipelines yield the results that are expected from them, without waiting for the item value to be received and preprocessed.

Each preprocessing step can be tested individually as well as all steps can be tested together. When you click on Test or Test all steps button respectively in the Actions block, a testing window is opened. Test values are stored between test sessions for either individual steps or all steps, allowing user to change preprocessing steps or item configuration and then return to the testing window without having to re-enter information.

Types of loads on beams pdf

Values are lost on a page refresh though. The testing is done by Zabbix server. The frontend sends a corresponding request to the server and waits for the result.

The request contains the input value and preprocessing steps with expanded user macros. For Change and Throttling steps, an optional previous value and time can be specified. The server responds with results for each preprocessing step. An item can become unsupported if its value cannot be retrieved for some reason.