In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Through the previous study, reading this article should have installed zabbix, but zabbix installed does not mean that it can be used, because its purpose is to monitor the server, just after installation can only monitor zabbix_server itself, obviously it is necessary to add a monitored computer in order to really use, and although zabbix itself has its own monitoring template, it is sometimes not applicable, such as the system is different. Different orders and so on, then what to do, at this time you need to add your own monitoring project.
Add monitored machines:
Let's see how to add a monitored machine. It's only two steps.
The first step is to install zabbix_agent on the monitored machine. If the system is different, there will be different zabbix_agent versions. This should be noted.
The second step is to add a machine to zabbix_web and set up a monitoring project or template
Let's explain in detail, the first step:
Do you remember the download address in the first article?
Http://www.zabbix.com/download
There is a separate zabbix_agent download inside. Pay attention to the link below Zabbix pre-compiled agents.
We need to separate the system to explain:
Linux
As you can see, not all linux versions shown above are applicable.
For the linux system, in fact, the source code package of the previous article was compiled directly.
Http://ncu.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.2.1/zabbix-3.2.1.tar.gz
Then open zabbix_agent alone, it is OK not to open zabbix_server, and the configuration file points to the monitoring host.
Of course, the easiest way is yum and apt-get, and it can be used by directly changing the configuration file, which is quite convenient
Yum install-y zabbix-agentapt-get install-y zabbix-agent
But the hidden trouble you also know, the version of these packages may be very old, there are many functions may not meet the requirements, especially the automatic discovery function, so it is not recommended, if it is a test, you can draw a convenient test.
That's all I've said about the installation, but it's not that complicated to use zabbix_agent. Just configure the address of the configuration file and open zabbix_agentd.conf.
# yum and apt-get installation, vim / etc/zabbix/zabbix_agentd.conf# compiled source code installation, vim / usr/local/zabbix/etc/zabbix_agentd.conf# change the following three places # # zabbix_server address Server=10.26.X.X## is the same as above, ServerActive=10.26.X.X## this should correspond to the zabbix_web definition, otherwise there will be an error, but this error does not affect the use of It will be explained later that Hostname=mysql101# save and exit is fine: WQ save # start zabbix_agent. Note that centos7 is different from service zabbix-agent start/etc/init.d/zabbix-agent startsh zabbix-agent start.
If you use the high endpoint and enable auto-discovery, in fact, zabbix_server will automatically discover the machine and then register it automatically. However, when we haven't talked about the high-end usage here, we are still talking about the most basic usage for the time being, so we need to add it manually later, but let's take a look at how to install windows's zabbix_agent.
Windows
One of the powerful aspects of this zabbix is that it can be cross-platform, not only to monitor linux, but also to monitor windows, first of all, of course, to install a zabbix_agent.
At the top of the first connection, pull to Zabbix pre-compiled agents, there is a windows (all) connection, click download to download it, that is, the following connection
Http://www.zabbix.com/downloads/3.2.0/zabbix_agents_3.2.0.win.zip
Unpack it to any disk, and I'll put it on disk C for the time being.
You can see that there are bin and conf folders, bin is the program folder, conf is the configuration folder.
Then edit the configuration file in conf to open it with text tools such as notepad++ and editplus. There is only one file called zabbix_agentd.win.conf in the conf folder. After opening it,
It's the same as where linux's configuration file needs to be changed.
# change the following three places # # the address Server=10.26.X.X## of zabbix_server should be the same as above. ServerActive=10.26.X.X## should correspond to the definition of zabbix_web, otherwise there will be an error, but this error will not affect the use. Hostname=mysql101 will be explained later.
Then, add zabbix_agent to the windows system service so that it can run in the background. At this point, you need to open a dos interface.
Click on the lower left corner, start-run-cmd, press enter key, assuming it is a 64-bit system, enter the 64-bit program directory
Microsoft Windows [version 6.1.7601] copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\ Users\ Administrator > cd C:\ zabbix_agents\ bin\ win64# added to the system service zabbix_agentd.exe-I-c.\..\ conf\ zabbix_agentd.win.confzabbix_agentd.exe [2304]: service [Zabbix Agent] installed successfullyzabbix_agentd.exe [2304]: event source [Zabbix Agent] installed successfully
This installation is complete, but by the way, some friends may have the wrong path, resulting in startup failure, which needs to be deleted and reinstalled from the service. Here is the command to delete the service.
Zabbix_agentd.exe-d-c.\..\ conf\ zabbix_agentd.win.conf
This will delete the service, and then continue to return to the above operation until the goal is achieved.
Of course, it is not over, the service has not been started, naturally it is not successful, in fact, we should know a general idea, let's talk about the more general situation.
Also click on the lower left corner, start-run-services.msc, press enter, drop down to find zabbix agent, right mouse button to start, or click the top triangle
At this point, the first step of adding the monitored machine is completed.
Let's explain it in detail. Step two:
First of all, open the zabbix_web interface, log in, enter directly with admin, add the host first, and remember to set the language.
Click in order, and the top configuration-host-create host
Then you see the create host interface, and the first thing you see is the host information to be created.
The first line. Here is the Hostname of the configuration file I just mentioned. If the two are inconsistent, an error will be reported on the agent side, but it will not affect the use.
The second line, here is the name visible in zabbix_web, which can be different from the first line.
The third line, here can be used by default, can also be created by yourself, this depends on your needs, if you feel the need to create independent distinction, you can create and do your own template connection, but here do not intend to elaborate, simply choose Templates, most of the monitoring modules have been included.
The fourth line, it is not recommended to create a new group here, that is, do not fill in anything, you really want to add: configuration-host group, where to configure the group.
The fifth line, here refers to the agent IP and port, the port is generally the default.
Other options need to be filled in again. I won't go into details here. I'll talk about it later when I have a chance.
After filling in the host information, you also need to set the monitoring template. Please see the template of the location pointed to by the arrow in the picture.
Click on the selection on the right when you get to this interface. A box pops up to select the template
The number of templates here depends on the group you just set. Templates has a bunch of default templates. You know why I suggest this.
Others do not intend to elaborate, after my test, many can not be used, Twmplate OS Linux and Twmplate OS Windows are the most useful, after ticking to the bottom, click Select, return to the box just now, click on the small "add" button above.
Finally, confirm that the information is correct, click the bottom big "add" button, add all the servers you want to monitor, and then you can see a situation similar to the following. Notice that there is an option on the right. If this side is green, it is proved to be available, that is, the monitoring is normal. If it is red here, even if there is data coming, it is abnormal. To troubleshoot.
The monitoring item here is how many items are monitored. For example, cpu has four values to monitor, that is, four items. The trigger is something related to the alarm. The alarm will be introduced later, and the graph is the monitoring graph that you can see.
Verify it, look at the monitoring graph, click the monitoring graph at the top, and then pay attention to the following figure
1, is an optional monitoring interval, which can be used to look at old data or specific time data.
2. Select the group you want to see. Remember that our group is Templates.
3, when it was created just now, it's up to you to define it.
4, which is the cpu load of linux, that is, the value of uptime, and the monitoring that comes with the template.
At this point, it's actually working, but let's talk about another powerful thing about zabbix. Automatic discovery of monitoring items, manual addition of monitoring items and triggers will be introduced later.
Please take a look at the following picture:
People who follow hands-on should find that this default template is originally only cpu jumps,cpu load,cpu utilization,memory usage, and I have many things related to DISK and Network here, that is, hard disk capacity monitoring and network card traffic monitoring. However, I did not add this manually. They have moved zabbix_server and zabbix_agent to find each other automatically. Is it very convenient? these are actually what we want. We don't have to do anything about this, we just have to wait, but sometimes it may be more and more complicated, and we need to distinguish it by ourselves.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.