https://www.zabbix.com/documentation/3.4/manual/quickstart/login

Quickstart

1login and configuring user

1.1login

column

Detail

note

Name

Admin

password

zabbix

Enter the user name Admin with password zabbix.As the superuser.

1)set language

After login with Admin,select “Administration”à “Users”àclick “Admin”àchoose “language” as you wantà”update”àrefresh the Webpage,it will work.

2)update password

Click the alias of Admin,turn to the User tab,click the “change password”,enter new password.

Featrues:

protection against brute force attacks

a)Zabbix interface will pause for 30 seconds in order to prevent brute force and dictionary attacks;

Brute force attacks: https://en.wikipedia.org/wiki/Brute-force_attack

Dictionayr attacks: https://en.wikipedia.org/wiki/Dictionary_attack

b)the IP address of a failed login attempt will be displayed after a successful login.

1.2add user

1)To view information about users, go to Administration → Users.

2)To add a new user, click on Create user.

column

Detail

note

Alias

invtzabbix

Name

invtzabbix

surname

invtzabbix

Groups

Zabbix administrators

Password

invtzabbix2018

3)add media

By default, new users have no media (notification delivery methods) defined for them. To create one, go to the 'Media' tab and click on Add.

4)add successful

The new user appears in the userlist

5)Adding permissions:

By default, a new user has no permissions to access hosts. To grant the user rights, click on the group of the user in the Groups column (in this case - 'Zabbix administrators'). In the group properties form, go to the Permissions tab.

This user is to have read-only access to Linux servers group, so click on Select next to the user group selection field.

In this pop-up, mark the checkbox next to 'Linux servers', then click Select. Linux servers should be displayed in the selection field. Click the 'Read' button to set permission level and then Add to add the group to the list of permissions. In the user group properties form, click Update.

Note: In Zabbix, access rights to hosts are assigned to user groups, not individual users.

6)login use the new user

2new host

https://www.zabbix.com/documentation/3.4/manual/quickstart/host

Abstract:A host in Zabbix is a networked entity (physical, virtual) that you wish to monitor. The definition of what can be a “host” in Zabbix is quite flexible. It can be a physical server, a network switch, a virtual machine or some application.

2.1adding host

module

Detail

note

Configuration

Submodule:hosts

The definition of what can be a “host” in Zabbix is quite flexible. It can be a physical server, a network switch, a virtual machine or some application.

The bare minimum to enter here is:

Column

Detail

note

Host name

Alphanumerics,spaces,dots,dashes and underscores are allowed.

Groups

Select one or several groups from the right hand side selectbox and click on « to move them to the 'In groups' selectbox.

All access permissions are assigned to host groups, not individual hosts. That is why a host must belong to at least one group.

Ip address

Enter the IP address of the host. Note that if this is the Zabbix server IP address, it must be specified in the Zabbix agent configuration file 'Server' directive.

If the ZBX icon in the Availability column is red, there is some error with communication - move your mouse cursor over it to see the error message. If that icon is gray, no status update has happened so far. Check that Zabbix server is running, and try refreshing the page later as well.

Click “Apply”

Start the zabbix-agent?

/etc/zabbix/zabbix_agentd.conf

Server=14.215.130.184

ListenPort=10050

ServerActive=14.215.130.184

Hostname=Zabbix-server

2.2adding item

2.2.1add item

module

Detail

note

Configuration

Submodule:hosts

Find the host we have created

The Items link in the row of 'New host' should display a count of '0'. Click on the link, and then click on Create item. This will present us with an item definition form.

For our sample item, the essential information to enter is:

Column

Detail

note

name

Enter CPU Load as the value. This will be the item name displayed in lists and elsewhere.

Key

Manually enter system.cpu.load as the value. This is a technical name of an item that identifies the type of information that will be gathered. The particular key is just one of pre-defined keys that come with Zabbix agent.

Type of information

Select Numeric (float) here. This attribute defines the format of expected data.

You may also want to reduce the amount of days item history will be kept, to 7 or 14. This is good practice to relieve the database from keeping lots of historical values.

click Add

Click on Details above the list to view what exactly was done.(on the top of “Items”,with “item updated” notice)

2.2.2seeing data

module

Detail

note

Monitoring

Submodule:Latest data

1)select 'New host' in the filter and click on Apply.

2)Then click on the + “before - other - “ and expect your item to be there and displaying data.

With that said, first data may take up to 60 seconds to arrive. That, by default, is how often the server reads configuration changes and picks up new items to execute.

3)Graphs:

To view the graph, go to Monitoring → Latest data and click on the 'Graph' link next to the item.

2.3New trigger

2.3.1adding trigger

Items only collect data. To automatically evaluate incoming data we need to define triggers. A trigger contains an expression that defines a threshold of what is an acceptable level for the data.

If that level is surpassed by the incoming data, a trigger will “fire” or go into a 'Problem' state - letting us know that something has happened that may require attention. If the level is acceptable again, trigger returns to an 'Ok' state.

module

Detail

note

Configuration

Submodule:host

find 'New host' and click on Triggers next to it and then on Create trigger.

For our trigger, the essential information to enter here is:

Column

Detail

note

name

Enter CPU load too high on 'New host' for 3 minutes as the value. This will be the trigger name displayed in lists and elsewhere.

Expression

Enter: {New host:system.cpu.load.avg(180)}>2

1)      This is the trigger expression. Make sure that the expression is entered right, down to the last symbol.

2)      The item key here (system.cpu.load) is used to refer to the item.

3)      This particular expression basically says that the problem threshold is exceeded when the CPU load average value for 3 minutes is over 2

4)      You can learn more about the syntax of trigger expressions.

( https://www.zabbix.com/documentation/3.4/manual/config/triggers/expression)

When done, click Add. The new trigger should appear in the trigger list.

2.3.2displaying trigger status

module

Detail

note

Monitoring

Submodule:Triggers

After 3 minutes or so (we asked to evaluate a 3-minute average after all) your trigger should appear there, presumably with a green 'OK' flashing in the 'Status' column.

1)      the flashing indicates a recent change of trigger status, one that has taken place in the last 30 minutes.

2)      If a red 'PROBLEM' is flashing there, then obviously the CPU load has exceeded the threshold level you defined in the trigger.

Not classified

OK

 

Never

 

No events

Zabbix-server

CPU load too high on 'Zabbix-server' for 3 minutes

Add

2.4Receiving problem notification

In this section you will learn how to set
up alerting in the form of notifications in Zabbix.

E-mail being the most popular delivery
method for problem notifications, we will learn how to set up an e-mail
notification

2.4.1E-mail settings

module

Detail

note

Administration

Submodule:Media types

click on Email in the list of pre-defined
media types.

1)     
Set the values of SMTP server,
SMTP helo and SMTP e-mail to the appropriate for your environment.

2)     
'SMTP email' will be used as
the 'From' address for the notifications sent from Zabbix.

3)     
A media type must be linked to
users by defining specific delivery addresses (like we did when configuring a
new user), otherwise it will not be used.

In our case:

https://blog.csdn.net/qq_34829953/article/details/77259425

step

Detail

note

Test email software

Check the sendmail and mailx software
installation status.

Test code(centos7):

echo "zabbix test mail" |mail
-s "zabbix" XXXXX@qq.com

1)Has been installed with the zabbix
installation,thus no need to install additionally.

2)Use qq email to test.if installed
successful,your qq email will recive the message.

Configure the media types

 

SMTP server:localhost

SMTP helo:localhost

SMTP email:zabbix@localhost

Edit the admin email info

 

2.4.2New action

Delivering notifications is one of the
things actions do in Zabbix.

module

Detail

note

Configuration

Submodule:Actions

click on Create action

1define what the action
should do

step

Detail

note

enter a name for the action

In the
most simple case, if we do not add any more specific conditions, the action
will be taken upon any trigger change from 'Ok' to 'Problem'.

We
still should define what the action should do - and that is done in the
Operations tab.

Click on New in the Operations
block

 

click on Add in the Send to Users
block and select the user (Admin') we have defined

{TRIGGER.STATUS} and {TRIGGER.NAME}
macros (or variables), visible in the Default subject and Default message
fields, will be replaced with the actual trigger status and trigger name
values.

Select 'Email' as the value of Send only to.

click on Add in the operation detail

 

2 Receiving notification

step

Detail

note

To receive notification,we
can change the trigger

{Zabbix-server:system.cpu.load.avg(2m)}>0.7

in
Monitoring → Triggers you should see the trigger with a flashing 'Problem'
status

you
should receive a problem notification in your e-mail

 

If notifications do not work:

1)verify once again that both the e-mail
settings and the action have been configured properly

2)make sure the user you created has at
least read permissions on the host which generated the event, as noted in the
Adding user step. The user, being part of the 'Zabbix administrators' user
group must have at least read access to 'Linux servers' host group that our
host belongs to.

3)Additionally, you can check out the
action log by going to Reports → Action log.

2.6New template

1While all of these steps offer a great deal
of flexibility in themselves, it may appear like a lot of steps to take if
needed for, say, a thousand hosts. Some automation would be handy.

2Templates allow to group useful items,
triggers and other entities so that those can be reused again and again by
applying to hosts in a single step.

3When a template is linked to a host, the
host inherits all entities of the template. So, basically a pre-prepared bunch
of checks can be applied very quickly.

2.6.1adding
template

step

Detail

note

in Configuration Templates click on Create
template

The
required parameters to enter here are:

1)     
Template name: Enter a
template name. Alpha-numericals, spaces and underscores are allowed.

2)     
Groups:

Select one or several groups from
the right hand side selectbox and click on « to move them to the 'In groups'
selectbox. The template must belong to a group.

Our template name:test template

As you may see, the template is there,
but it holds nothing in it - no items, triggers or other entities.

Adding
item to template

1)     
go to the item list for 'New host'. In ConfigurationHosts click on Items
next to 'New host'.

2)     
mark the checkbox of the 'CPU Load' item in the list

3)     
click on Copy below the list

4)     
select the template to copy item to

5)     
click on Copy

Check
the result

go to ConfigurationTemplates, ' test template ' should have one new
item in it.

Linking
template to host

go to Configurationhosts, click on 'New
host' to open its property form and go to the Templates tab.

With a template ready, it only remains to
add it to a host.

click
on Select next to Link new templates

1In the pop-up window click on the name
of template we have created (' test
template
')

The
template should appear in the Linked templates list

As it
appears in the Link new templates
field, click on Add.

Click Update in the form to save the
changes.

The
template is now added to the host, with all entities that it holds.

Linking
pre-defined templates to hosts

1As
you may have noticed, Zabbix comes with a set of predefined templates for
various OS, devices and applications.

2 To get started with monitoring very
quickly, you may link the appropriate one of them to a host, but beware that
these templates need to be fine-tuned for your environment. Some checks may
not be needed, and polling intervals may be way too frequent.

Note: As you may have guessed, this way it can be applied to any other
host as well. Any changes to the items, triggers and other entities at the
template level will propagate to the hosts the template is linked to.

 

zabbix系列之四——快速使用的更多相关文章

  1. Sql Server来龙去脉系列之四 数据库和文件

        在讨论数据库之前我们先要明白一个问题:什么是数据库?     数据库是若干对象的集合,这些对象用来控制和维护数据.一个经典的数据库实例仅仅包含少量的数据库,但用户一般也不会在一个实例上创建太多 ...

  2. Red Gate系列之四 SQL Data Compare 10.2.0.885 Edition 数据比较同步工具 完全破解+使用教程

    原文:Red Gate系列之四 SQL Data Compare 10.2.0.885 Edition 数据比较同步工具 完全破解+使用教程 Red Gate系列之四 SQL Data Compare ...

  3. .NET 4 并行(多核)编程系列之四 Task的休眠

    原文:.NET 4 并行(多核)编程系列之四 Task的休眠 .NET 4 并行(多核)编程系列之四 Task的休眠 前言:之前的几篇文章断断续续的介绍了Task的一些功能:创建,取消.本篇介绍Tas ...

  4. .Neter玩转Linux系列之四:Linux下shell介绍以及TCP、IP基础

    基础篇 .Neter玩转Linux系列之一:初识Linux .Neter玩转Linux系列之二:Linux下的文件目录及文件目录的权限 .Neter玩转Linux系列之三:Linux下的分区讲解 .N ...

  5. ActiveMQ系列之四:用ActiveMQ构建应用

    Broker:相当于一个ActiveMQ服务器实例 命令行启动参数示例如下: 1:activemq start :使用默认的activemq.xml来启动 2:activemq start xbean ...

  6. SpringBoot系列: RestTemplate 快速入门

    ====================================相关的文章====================================SpringBoot系列: 与Spring R ...

  7. 单元测试系列之四:Sonar平台中项目主要指标以及代码坏味道详解

    更多原创测试技术文章同步更新到微信公众号 :三国测,敬请扫码关注个人的微信号,感谢! 原文链接:http://www.cnblogs.com/zishi/p/6766994.html 众所周知Sona ...

  8. C++ 提取网页内容系列之四正则

    标 题: C++ 提取网页内容系列之四作 者: itdef链 接: http://www.cnblogs.com/itdef/p/4173833.html 欢迎转帖 请保持文本完整并注明出处 将网页内 ...

  9. zabbix系列(八)zabbix添加对web页面url的状态监控

    通过zabbi做web监控不仅仅可以监控到站点的响应时间,还可以根据站点返回的状态码,或者响应时间做报警 1.对需要监控的主机添加web监控   在configuration—hosts 中打开主机列 ...

随机推荐

  1. 搜集C++实现的线程池

    现在很多语言都内置了线程池实现,但C++中却没有.本文列举一些C++实现的线程池工具. Boost.Threadpool 项目首页:http://threadpool.sourceforge.net ...

  2. 一桩由X509Certificate2引发的血案

    A process serving application pool '. The data field contains the error number. 在某次网站更新后,发现wcf服务不可用了 ...

  3. Postman安装及简介

    Postman简介 不管web自动化测试还是APP自动化端,测试过程中都会涉及到接口测试.接口测试分为服务器端测试和客户端测试.今天给大家介绍一个测试服务器端的小工具--Postman.它可以构造各类 ...

  4. Android PdfViewer

    今天按项目要求找了一个android的PDF控件,各种操作效果都非常好,在这里和大家分享一下. 这是github的地址:https://github.com/barteksc/AndroidPdfVi ...

  5. Maven启动代理服务器

    0.什么叫代理服务器? 代理服务器英文全称是(Proxy Server),其功能就是代理网络用户去取得网络信息.形象的说:它是网络信息的中转站. 代理服务器就好象一个大的Cache,这样就能显著提高浏 ...

  6. php的error_log()记录日志

    <?php date_default_timezone_set('PRC');//设置时区,否则会有警告 //把This s a error保存到/home/log-yyyy-MM-dd.txt ...

  7. ADB故障时的一些命令

    开发中经常用到adb重启等操作,简单记录一下. 1.重启 adb kill-server adb start-server 2.显示版本号 adb version 3.显示已连接的设备 adb dev ...

  8. [Linux]——进程管理相关

    一些概念 程序program:通常以二进制程序放置在存储媒介中,以物理文件形式存在 进程process:程序通过用户执行被触发后,执行者的权限与属性.程序的代码和所需数据会被加载到内存中,OS给予这个 ...

  9. Keepalived 无法自动转换主备角色,请关注 iptables 防火墙配置

    最近在研究服务器高可用集群 (HA)…… 搭建了主备两台Keepalived,配置什么的全是网上照抄的,被验证过无数遍的示例…… 然而Master和Backup无法自动切换.两边会同时绑定浮动IP(V ...

  10. elasticsearch-head的使用

    ealsticsearch只是后端提供各种api,那么怎么直观的使用它呢?elasticsearch-head将是一款专门针对于elasticsearch的客户端工具 elasticsearch-he ...