In a world where we both need to focus on adapting new IT solutions and increasing operational efficiency, we need to start working smarter and more proactively.
With every Red Hat Enterprise Linux (RHEL) subscription, you get free access to Red Hat Insights, an advanced analytics service which greatly helps increase operational efficiency with very little effort. This blog entry is about how you can connect Red Hat Insights with your existing operational processes to help you work more proactively.
Short intro to Red Hat Insights
A large percentage of critical issues raised with Red Hat Support are already known to Red Hat or our partners. Among other things, Red Hat Insights provides the ability to automatically match your systems to these known problems and review suggested resolutions.
The matching process works by Red Hat Insights clients on your systems sending a small analysis package to cloud.redhat.com either via your Satellite server, a web proxy, or by direct connection. You can then triage and prioritize issues identified by Insights, and review information from the Advisor service via cloud.redhat.com or in Red Hat Satellite or Red Hat Ansible Tower.
![insights management fig 2 insights management fig 2](/rhdc/managed-files/styles/wysiwyg_full_width/private/image1_57_0.png.webp?itok=SULbtLMY)
Integrating your monitoring system with Red Hat Insights
Note: the steps presented in this blog are not necessarily supported, as some functions (check-result and show-result) are being used outside their original scope.
Installing the Red Hat Insights client on your RHEL servers and starting to use isn’t too hard. With some effort, you can integrate it into your operational workflow. Useful information only displayed on a webpage tends to not be used 100% of the time. A way to help solve the issues identified by Red Hat Insights is to latch onto an existing operational process. One such process that is well established at most companies is the process that governs monitoring of IT systems. Let’s look into how we can connect your monitoring system with Red Hat Insights.
Once you have registered your system to Red Hat Insights, you can query which issues Red Hat Insights have identified for your system and display the result locally. You do so by running these commands:
# insights-client
This is the base Insights client command. If the system is already registered to Insights, running this command will generate a new metadata collection and send it to cloud.redhat.com for analysis.
# insights-client --check-result
This command will refresh the results from cloud.redhat.com on the host. Note that this command is currently undocumented.
# insights-client --show-result
This command will output the results from the --check-result command as JSON-formatted output.
Example output below:
[ { "rule": { "rule_id": "decreased_vm_network_performance|VHOST_NET_KERNEL_MODULE_NOT_LOADED", "created_at": "2020-09-25T07:37:09.861713Z", "updated_at": "2020-09-28T01:30:43.910724Z", "description": "VM network performance is decreased when the vhost_net kernel feature is not enabled", "active": true, "category": { "id": 4, "name": "Performance" }, "impact": { "name": "Network Performance Loss", "impact": 2 }, "likelihood": 4, "node_id": "", "tags": "kernel kvm networking performance rhel8 sbr_virtualization tuning vhost_net vm", "reboot_required": false, "publish_date": "2020-09-26T06:20:00Z", "summary": "VM network performance is decreased when the vhost_net kernel feature is not enabled.\n", "generic": "The `vhost_net` kernel module is used to accelerate the Host kernel using the `virtio-net` module. If it is **not loaded**, the VM network performance is decreased.\n", "reason": "This VM is running **RHEL{{=pydata.rhel_version}}** with the `vhost_net` kernel module disabled. As a result, VM network performance will be decreased.\n", "more_info": "For more information about Optimizing virtual machine network performance, refer to [Optimizing virtual machine network performance](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/monitoring_and_managing_system_status_and_performance/optimizing-virtual-machine-performance-in-rhel-8_monitoring-and-managing-system-status-and-performance#optimizing-virtual-machine-network-performance_optimizing-virtual-machine-performance-in-rhel-8) section.\n", "resolution_set": [ { "system_type": 105, "resolution": "Red Hat recommends that you enable the `vhost_net` kernel module:\n ~~~\n # modprobe vhost_net\n ~~~\n\nAlternatively, you can persistently load the `vhost_net` kernel module on reboot:\n ~~~\n # echo vhost_net > /etc/modules-load.d/vhost_net.conf\n ~~~\n", "resolution_risk": { "name": "Load Module", "risk": 1 }, "has_playbook": true } ], "total_risk": 3 }, "details": { "type": "rule", "error_key": "VHOST_NET_KERNEL_MODULE_NOT_LOADED", "rhel_version": "8.2" }, "resolution": { "system_type": 105, "resolution": "Red Hat recommends that you enable the `vhost_net` kernel module:\n ~~~\n # modprobe vhost_net\n ~~~\n\nAlternatively, you can persistently load the `vhost_net` kernel module on reboot:\n ~~~\n # echo vhost_net > /etc/modules-load.d/vhost_net.conf\n ~~~\n", "resolution_risk": { "name": "Load Module", "risk": 1 }, "has_playbook": true } } ]
By creating a tool that reads this JSON, we can connect Red Hat Insights to a monitoring tool. Before we show an example of such an integration, let’s make a quick note of some items of interest for creating such an integration.
-
As of this writing, the show-result command only shows information from Insights Advisor, not about vulnerabilities or compliance or new software available.
-
Issues identified are organized into four categories: “Security,” “Availability,” “Stability” and “Performance”.
-
Total risk is a combination of likelihood of the issue and impact to remediate the issue.
-
Has_playbook identifies if Red Hat Insights has a ready-to-go Ansible playbook to remediate the issue. This playbook can be downloaded from the cloud.redhat.com user interface or via application programming interfaces (APIs). You won’t be able to generate the playbook from the command line of the client.
-
Requires_reboot tells us if we need to reboot the system to remediate the issue.This allows prioritization of issues which may not require downtime or coordination with other teams.
The most basic integration would be to simply look through identified issues and then trigger an alert if we pass N number of identified issues.
A proof of concept of such an integration can be found on this GitHub repository. The page describes how to use a simple Python script to process insights-client JSON output and notify monitoring solutions. A couple of examples are provided for running the script in different modes and configurations, specifically how to integrate with the widely popular open source monitoring system Nagios.
![insights management fig 4 insights management fig 4](/rhdc/managed-files/styles/wysiwyg_full_width/private/image5_25_0.png.webp?itok=VyLT_zq1)
In the picture above, the proof of concept integration tool has sent exit code 1, which Nagios understands as “warning.”
Once we have integrated with our monitoring system, we can help to ensure that issues identified by Red Hat Insights are continuously acted on and resolved. This empowers operational processes that depend on monitoring, like checking for alerts before putting systems or releases into production or after performing patching.
To conclude, in this post we looked at one of the options to integrate Red Hat Insights into your operational workflows, in particular how you can use the insights client to integrate with a monitoring system. For a more in-depth look at Red Hat Insights, check out our introductory blog post on its other capabilities.
저자 소개
Magnus Glantz is a Senior Solution Architect for Red Hat in EMEA.
채널별 검색
오토메이션
기술, 팀, 인프라를 위한 IT 자동화 최신 동향
인공지능
고객이 어디서나 AI 워크로드를 실행할 수 있도록 지원하는 플랫폼 업데이트
오픈 하이브리드 클라우드
하이브리드 클라우드로 더욱 유연한 미래를 구축하는 방법을 알아보세요
보안
환경과 기술 전반에 걸쳐 리스크를 감소하는 방법에 대한 최신 정보
엣지 컴퓨팅
엣지에서의 운영을 단순화하는 플랫폼 업데이트
인프라
세계적으로 인정받은 기업용 Linux 플랫폼에 대한 최신 정보
애플리케이션
복잡한 애플리케이션에 대한 솔루션 더 보기
오리지널 쇼
엔터프라이즈 기술 분야의 제작자와 리더가 전하는 흥미로운 스토리
제품
- Red Hat Enterprise Linux
- Red Hat OpenShift Enterprise
- Red Hat Ansible Automation Platform
- 클라우드 서비스
- 모든 제품 보기
툴
체험, 구매 & 영업
커뮤니케이션
Red Hat 소개
Red Hat은 Linux, 클라우드, 컨테이너, 쿠버네티스 등을 포함한 글로벌 엔터프라이즈 오픈소스 솔루션 공급업체입니다. Red Hat은 코어 데이터센터에서 네트워크 엣지에 이르기까지 다양한 플랫폼과 환경에서 기업의 업무 편의성을 높여 주는 강화된 기능의 솔루션을 제공합니다.