Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
icinga-checks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
icinga-checks
Merge requests
!270
Update docs
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Update docs
update-docs
into
master
Overview
0
Commits
3
Pipelines
0
Changes
2
Merged
Update docs
Hahn Axel (hahn)
requested to merge
update-docs
into
master
Jun 7, 2024
Overview
0
Commits
3
Pipelines
0
Changes
2
0
0
Merge request reports
Viewing commit
91c7be7d
Prev
Next
Show latest version
2 files
+
94
−
12
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
91c7be7d
check requirements: use iml help and add link to docs
· 91c7be7d
Hahn Axel (hahn)
authored
Jun 7, 2024
docs/20_Checks/check_requirements.md
0 → 100644
+
89
−
0
View file @ 91c7be7d
Edit in single-file editor
Open in Web IDE
# Check_requirements
## Introduction
**check_requirements**
is a plugin to run different check to show the ability to run an application. You can these checks
*
Check if a process exists
*
Check an open udp or tcp port (local or on given host/ ip)
You can insert a label to create multiple blocks.
## Requirements
*
`ps`
*
`top`
## Syntax
```
txt
______________________________________________________________________
CHECK_REQUIREMENTS
v1.2
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
https://os-docs.iml.unibe.ch/icinga-checks/Checks/check_requirements.html
______________________________________________________________________
Check if a list requirements regarding processes and network
connections do exist.
The check returns OK if all given requirements match.
SYNTAX:
check_requirements [-h] [-v] [PARAMETERS]
OPTIONS:
-h|--help show this help.
-v|--verbose show more data: processes and port numbers from
/etc/services; add it as first param
PARAMETERS:
-c|--connect TYPE TARGET PORT
check if connect to a server to a given port
is reachable
TYPE string one of tcp|udp
TARGET string target host
PORT int port number
-l|--label STRING add label to divide the output in multiple sections
-p|--process STRING check if a process with given regex exists in the
output of 'ps aux'
-t|--tcp PORT check if connect on local tcp port is reachable;
This is a shortcut for '-c tcp localhost PORT'
The parameters can be repeated multiple times. Checks will be executed in
the given order.
EXAMPLES
check_requirements -p httpd -p mysqld -t 22 -t 80 -t 443 -t 3306
Check if
- a process httpd and a process mysqld exist
- localhost listens to ports 22, 80, 443 and 3306
check_requirements -l "webservice" -p httpd -t 80 -t 443 -l "database" -p mysqld -t 3306
Use output with multiple sections
```
### Parameters
(none)
## Examples
Check a webservice as process and 2 ports:
``check_requirements -p nginx -t 443 -t 80``
```
txt
OK: 3 Requirement checks - errors: 0
STATUS TYPE RESULT
OK process nginx (2 x)
OK connection tcp to localhost on port 443
OK connection tcp to localhost on port 80
```
Loading