Most Linux distributions use systemd as a system and service manager. It is responsible for managing the boot process, starting and stopping services, and handling system processes. It also provides a range of features and advantages over traditional init systems, such as parallel service startup, on-demand service activation, socket-based activation, and dependency-based service control.
Monitoring the state of systemd and Linux services allows you to check that critical services are running and available, that all required dependencies are met, and that services are starting and stopping correctly in the desired order. Monitoring systemd can also help identify security-related issues or suspicious behavior within services.
Overall, monitoring systemd and the state of Linux services helps implement the stability, availability, and optimal performance of your system, enabling proactive management and timely response to issues such as service outages.
Monitoring systemd at scale with Red Hat Insights
Monitoring the state of Linux services at scale presents several challenges that must be addressed for effective monitoring and management. Red Hat Insights analyzes all the crucial system metadata, including the list of running services along with its state. Without any additional configuration on the Red Hat Enterprise Linux (RHEL) hosts, Insights users can now create a custom Insights policy and receive an alert whenever there’s a failed service under systemd management within their environment.
Users of Insights policies can easily create and manage rule conditions to evaluate against system facts and get automatic alerts whenever there’s a trigger. They can also use operational management to automate tasks such as:
- Raising an alert when conditions are met on system configuration
- Emailing a team when security packages are out of date on a system
- Creating an issue in external ticketing systems when policies are breached
Learn more about Insights policies from our previous post, Getting started with the Red Hat Insights policies capability.
Configuring custom policy using the new systemd facts
First, navigate to the Red Hat Hybrid Cloud Console, available at console.redhat.com, and select Insights for RHEL on the main page to land in Red Hat Insights. Next, in the left-hand navigation, expand the Operations section and click on Policies. On this screen, you can easily create a new policy by following these steps:
Hit the Create Policy button to open up the Policy creation wizard, select 'From scratch', and hit the Next button.
On the second page, choose a suitable policy name and optional description.
After hitting Next, copy and paste the following condition: facts.systemd.failed > 0
and have it validated by clicking on the Validate condition button. This checks the syntax of the condition.
Another option is to use the state attribute of the newly added systemd fact: facts.systemd.state = 'degraded'
. Other values include initializing, starting, running, maintenance, and stopping. More details can be found here.
The fourth screen lets you configure the Trigger actions. Select Send a notification to notify the user everytime the policy hits.
On the last step, review the policy setup and toggle the "Policy is enabled" button to activate it.
Once applied, the Policy service will trigger a "Policy triggered" event every time there is a failed service picked up by Insights. This event can be turned into an email message or Slack notification, or it can create a ServiceNow ticket﹘for example, according to the user’s Configuring notifications on the Red Hat Hybrid Cloud Console.
This enhancement is a direct result of our discussions with Insights users; in particular with a large user in the financial sector that maintains thousands of RHEL hosts.
Never hesitate to reach out to us with any questions and feedback at insights@redhat.com, or directly within Insights through our global feedback form. We are happy to help and listen to your needs.
Start mitigating failed systemd services at scale with Red Hat Insights today, included with your existing Red Hat Enterprise Linux subscription. Visit our Red Hat Insights product page for more information on how to get started.
저자 소개
With more than 10 years of experience in the software industry, Stefan Bunciak is currently the Product Manager for Red Hat Insights. He completed his master's degree in Informatics at Masaryk University in Brno and is skilled in project and people management, quality engineering, and software development. In his spare time, he plays violin in a folklore band.
채널별 검색
오토메이션
기술, 팀, 인프라를 위한 IT 자동화 최신 동향
인공지능
고객이 어디서나 AI 워크로드를 실행할 수 있도록 지원하는 플랫폼 업데이트
오픈 하이브리드 클라우드
하이브리드 클라우드로 더욱 유연한 미래를 구축하는 방법을 알아보세요
보안
환경과 기술 전반에 걸쳐 리스크를 감소하는 방법에 대한 최신 정보
엣지 컴퓨팅
엣지에서의 운영을 단순화하는 플랫폼 업데이트
인프라
세계적으로 인정받은 기업용 Linux 플랫폼에 대한 최신 정보
애플리케이션
복잡한 애플리케이션에 대한 솔루션 더 보기
오리지널 쇼
엔터프라이즈 기술 분야의 제작자와 리더가 전하는 흥미로운 스토리
제품
- Red Hat Enterprise Linux
- Red Hat OpenShift Enterprise
- Red Hat Ansible Automation Platform
- 클라우드 서비스
- 모든 제품 보기
툴
체험, 구매 & 영업
커뮤니케이션
Red Hat 소개
Red Hat은 Linux, 클라우드, 컨테이너, 쿠버네티스 등을 포함한 글로벌 엔터프라이즈 오픈소스 솔루션 공급업체입니다. Red Hat은 코어 데이터센터에서 네트워크 엣지에 이르기까지 다양한 플랫폼과 환경에서 기업의 업무 편의성을 높여 주는 강화된 기능의 솔루션을 제공합니다.