Icinga uses NSCA to monitor remote Linux servers

Source: Internet
Author: User
Tags icinga

Icinga uses NSCA to monitor remote Linux servers. Because the HTTP service is a public service, you do not need to install the agent on a remote machine. 131 of local resources, such as disks and CPUs, need to install a software. Icinga provides two modes: active check (server. 111 polling. 131). This efficiency is not recommended. Another mode, passive check, is waiting for the remote agent to send messages. The combination of NSCA plug-in and icinga can achieve this effect. This is recommended. Unfortunately, this project has been terminated since last year. If you want to continue, you have to come by yourself. Let's see how to use it first. This document can help us install and use it. Http://docs.icinga.org/latest/en/nsca.htmlonly. when running. /nsca-c .. /sample-config/nsca. when cfg has insufficient permissions, simply use chmod-R 777 to modify the directory permissions. in 10.3.6, select the xinetd method. In Ubuntu, install: [plain] apt-et install xinetd and then edit/etc/hosts. add a line to the allow file: [plain] ALL: 10.112.18.131 3. after some files are copied to machine 131, there is no need to create any incinga user. You can directly use root to test 4 .. 111 linux on icinga server. the configuration of the cfg file is as follows: [plain] define host {use linux-server; Inherit default values from Template host_name StaticFileServer; The name we're re giving to this host alias static filer server for 3D and jenksins server for CloudEngine; A longer name associated with the host address 10.112.18.131; IP address of the host contact_groups admins; Host groups this host is associated with} # check that web services are running define service {host_name StaticFileServer service_description HT TP check_command check_http use generic-service action_url http: // 10.112.18.131/ArcGIS/rest/services/SanFrancisco/3 DFeatureServer notification_interval 0; set> 0 if you want to be renotified} define service {use generic-service; template to inherit from name passive-service; name of this template active_checks_enabled 0; no active checks passive_checks_enabled 1; allow passive checks check _ Command check_dummy! 0; use "check_dummy", RC = 0 (OK) check_period 24x7; check active all the time check_freshness 0; do not check if check result is stale register 0; this is a template, not a real service} define service {use passive-service; template to inherit from host_name StaticFileServer; host where send_nsca is located service_description Diskspace; service to be checked} 5. log File Location:/usr/local/icinga/v Ar/icinga. log6. commands. the check_dummy command has been defined in cfg and does not need to be modified. 7 .. 131 run the command to test and send data: [plain] echo-e "StaticFileServer \ tDiskspace \ t0 \ t/var = 78% \ n" |/usr/local/icinga/bin/send_nsca-H 10.112.18.111-c/usr/ local/icinga/etc/send_nsca.cfg note StaticFileServer case cannot be wrong, /var = 78% is the message sent. -H is followed by the IP address of the icinga server 8. finally, the log contains: [plain] [1368620324] external command: PROCESS_SERVICE_CHECK_RESULT; StaticFileServer; Diskspace; 0;/var = 78% [1368620332] passive service check: StaticFileServer; Diskspace; 0; /var = 78% 9. A line of records can also be seen on the web page. But after writing the article, I can't see it. I am still not familiar with icinga. I found it later. Conclusion: NSCA solves the communication problem that the monitoring terminal sends messages to the server. The monitoring script should be compiled by itself to collect data. Therefore, this architecture is flexible and can be used freely. However, there are a lot of things to do, and we will try the overall solution: Check_MK. If we can develop it again, it will be very powerful.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.