nagios
БесплатноБез исполняемых скриптовНе проверенNagios Core is a self-hosted monitoring system that runs check plugins against hosts and services and sends alerts when their state changes. Use it when the…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Nagios
Overview
Nagios Core schedules check plugins (small programs that print one status line and exit 0 OK, 1 WARNING, 2 CRITICAL or 3 UNKNOWN) and notifies contacts when a host or service changes state. Everything is configured through object definitions: hosts, services, commands, contacts, time periods and templates. This skill follows the Debian/Ubuntu packages (nagios4, paths under /etc/nagios4). Upstream's latest Core is 4.5.x, which is built from source; the object syntax shown here is the same.
Instructions
Task A: Install
sudo apt-get update
sudo apt-get install -y nagios4 monitoring-plugins nagios-nrpe-plugin apache2-utils
sudo systemctl enable --now nagios4
# The web UI is served by Apache; Debian restricts it to private addresses and
# uses Digest auth for cmd.cgi, with realm "Nagios4"
sudo htdigest -c /etc/nagios4/htdigest.users Nagios4 nagiosadmin
The plugin package is monitoring-plugins (the old nagios-plugins name is gone). Plugins live in /usr/lib/nagios/plugins/. The packaged /etc/nagios4/nagios.cfg already loads cfg_dir=/etc/nagios4/conf.d, the sample templates in /etc/nagios4/objects/ (generic-host, linux-server, generic-service, generic-contact) and /etc/nagios-plugins/config/*.cfg, so put your files in /etc/nagios4/conf.d/ and leave the rest of nagios.cfg alone. After editing nagios.cfg, always verify it:
sudo nagios4 -v /etc/nagios4/nagios.cfg
Task B: Hosts and services
The packaged templates assign contact_groups admins. If you have no such group, set contact_groups on every host and service (below) or the verification fails with Contactgroup 'admins' is not defined anywhere.
# /etc/nagios4/conf.d/web-servers.cfg
define host {
use linux-server
host_name web-01
alias Web Server 01
address 10.20.0.10
hostgroups web-servers
contact_groups platform-team
}
define host {
use linux-server
host_name web-02
alias Web Server 02
address 10.20.0.11
hostgroups web-servers
contact_groups platform-team
}
define hostgroup {
hostgroup_name web-servers
alias Web Servers
}
define service {
use generic-service
hostgroup_name web-servers
service_description HTTP
check_command check_http_status!80!200,301
contact_groups platform-team
}
define service {
use generic-service
hostgroup_name web-servers
service_description HTTPS Certificate
check_command check_cert_expiry!443!30
check_interval 360
notification_interval 360
contact_groups platform-team
}
define service {
use generic-service
hostgroup_name web-servers
service_description Disk Usage
check_command check_nrpe!check_disk
contact_groups platform-team
}
Members of a hostgroup are declared on each host with hostgroups (do not repeat them in a members line). linux-server uses the check-host-alive host check, which is defined in the plugin templates under /etc/nagios-plugins/config/; if nagios4 -v says it is not defined, define it with check_ping. The 30 argument (-C 30) makes check_http go CRITICAL when the certificate expires in under 30 days. Intervals are in minutes (interval_length=60 seconds by default). A notification interval shorter than the check interval triggers a warning, hence the equal values.
Task C: Commands and NRPE
check_http and check_nrpe commands ship with the packages, so do not define commands with those names again (duplicate names are a config error). The packaged check_http wraps $ARG1$ in single quotes, so it passes several options as one argument and fails (Invalid port number); give each option its own $ARGn$ in your own commands under new names:
# /etc/nagios4/conf.d/commands.cfg
define command {
command_name check_http_status
command_line /usr/lib/nagios/plugins/check_http -H $HOSTADDRESS$ -p $ARG1$ -e $ARG2$
}
define command {
command_name check_cert_expiry
command_line /usr/lib/nagios/plugins/check_http -H $HOSTADDRESS$ -S -p $ARG1$ -C $ARG2$
}
define command {
command_name check_http_content
command_line /usr/lib/nagios/plugins/check_http -H $HOSTADDRESS$ -p $ARG1$ -u $ARG2$ -s "$ARG3$"
}
define command {
command_name check_postgres
command_line /usr/lib/nagios/plugins/check_pgsql -H $HOSTADDRESS$ -d $ARG1$ -l $ARG2$
}
On each monitored host install the NRPE daemon and the plugins, then declare the checks the server may run:
sudo apt-get install -y nagios-nrpe-server monitoring-plugins-basic
# /etc/nagios/nrpe_l
Установить nagios в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл nagios?
Nagios Core is a self-hosted monitoring system that runs check plugins against hosts and services and sends alerts when their state changes. Use it when the user asks to install Nagios Core, define hosts and services, write check commands or custom plugins, monitor remote servers with NRPE, or set up notification contacts.
Как установить скилл nagios?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл nagios запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic