mirror of
https://github.com/Icinga/icinga2.git
synced 2026-04-15 22:00:07 -04:00
I've used the following command to replace the original copyright header
lines in a C-style comment block:
```
$ find . \( -type d \( -name '\..*' -o -name third-party -o -name scripts -o -name prefix -o -name malloc -o -name server -o -name docker -o -name build -o -name doc \) -prune \) -o -type f -exec perl -pi -e 's{/\*[^*]*\(\s*c\s*\)\s*(\d{4})\s*Icinga\s+GmbH[^*]*\*/}{// SPDX-FileCopyrightText: \1 Icinga GmbH <https://icinga.com>\n// SPDX-License-Identifier: GPL-2.0-or-later}gi' {} +
```
For files that use shell-style comments (#) like CMakeLists.txt, I've
used this command:
```
$ find . \( -type d \( -name '\..*' -o -name third-party -o -name scripts -o -name prefix -o -name malloc -o -name server -o -name docker -o -name build -o -name doc \) -prune \) -o -type f -exec perl -pi -e 's{#.*\(\s*c\s*\)\s(\d{4})\sIcinga\s+GmbH.*}{# SPDX-FileCopyrightText: \1 Icinga GmbH <https://icinga.com>\n# SPDX-License-Identifier: GPL-2.0-or-later}gi' {} +
```
And for SQL files:
```
$ find . \( -type d \( -name '\..*' -o -name third-party -o -name scripts -o -name prefix -o -name malloc -o -name server -o -name docker -o -name build -o -name doc \) -prune \) -o -type f \( -name '*.sql' \) -exec perl -pi -e 's{--.*\(c\)\s(\d{4})\sIcinga\sGmbH.*}{-- SPDX-FileCopyrightText: \1 Icinga GmbH <https://icinga.com>\n-- SPDX-License-Identifier: GPL-2.0-or-later}gi' {} +
$ find . \( -type d \( -name '\..*' -o -name third-party -o -name scripts -o -name prefix -o -name malloc -o -name server -o -name docker -o -name build -o -name doc \) -prune \) -o -type f \( -name '*.sql' \) -exec perl -pi -e 's{-- Copyright \(c\)\s(\d{4})\sIcinga\s+Development\sTeam.*}{-- SPDX-FileCopyrightText: \1 Icinga GmbH <https://icinga.com>\n-- SPDX-License-Identifier: GPL-2.0-or-later}gi' {} +
```
113 lines
2.5 KiB
Text
113 lines
2.5 KiB
Text
// SPDX-FileCopyrightText: 2012 Icinga GmbH <https://icinga.com>
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
object CheckCommand "cloudera_service_status" {
|
|
command = [ PluginContribDir + "/check_cloudera_service_status.py" ]
|
|
|
|
arguments = {
|
|
"-H" = {
|
|
description = "host"
|
|
value = "$cloudera_host$"
|
|
required = true
|
|
}
|
|
"-P" = {
|
|
description = "port"
|
|
value = "$cloudera_port$"
|
|
required = false
|
|
}
|
|
"-u" = {
|
|
description = "user"
|
|
value = "$cloudera_user$"
|
|
required = true
|
|
}
|
|
"-p" = {
|
|
description = "pass"
|
|
value = "$cloudera_pass$"
|
|
required = true
|
|
}
|
|
"-v" = {
|
|
description = "api_version"
|
|
value = "$cloudera_api_version$"
|
|
required = true
|
|
}
|
|
"-c" = {
|
|
description = "cluster"
|
|
value = "$cloudera_cluster$"
|
|
required = true
|
|
}
|
|
"-s" = {
|
|
description = "service"
|
|
value = "$cloudera_service$"
|
|
required = true
|
|
}
|
|
"-k" = {
|
|
description = "verify_ssl"
|
|
value = "$cloudera_verify_ssl$"
|
|
required = false
|
|
}
|
|
}
|
|
}
|
|
|
|
object CheckCommand "cloudera_hdfs_space" {
|
|
command = [ PluginContribDir + "/check_cloudera_hdfs_space.py" ]
|
|
|
|
arguments = {
|
|
"-H" = {
|
|
description = "Namenode host"
|
|
value = "$cloudera_hdfs_space_host$"
|
|
required = true
|
|
}
|
|
"-P" = {
|
|
description = "Namenode port (default 50070)"
|
|
value = "$cloudera_hdfs_space_port$"
|
|
required = false
|
|
}
|
|
"-d" = {
|
|
description = "HDFS disk to check"
|
|
value = "$cloudera_hdfs_space_disk$"
|
|
required = true
|
|
}
|
|
"-w" = {
|
|
description = "Warning threshold in percent"
|
|
value = "$cloudera_hdfs_space_warn$"
|
|
required = true
|
|
}
|
|
"-c" = {
|
|
description = "Critical threshold in percent"
|
|
value = "$cloudera_hdfs_space_crit$"
|
|
required = true
|
|
}
|
|
}
|
|
}
|
|
|
|
object CheckCommand "cloudera_hdfs_files" {
|
|
command = [ PluginContribDir + "/check_cloudera_hdfs_files.py" ]
|
|
|
|
arguments = {
|
|
"-H" = {
|
|
description = "Namenode host"
|
|
value = "$cloudera_hdfs_files_host$"
|
|
required = true
|
|
}
|
|
"-P" = {
|
|
description = "Namenode port (default 50070)"
|
|
value = "$cloudera_hdfs_files_port$"
|
|
required = false
|
|
}
|
|
"-w" = {
|
|
description = "Warning threshold"
|
|
value = "$cloudera_hdfs_files_warn$"
|
|
required = true
|
|
}
|
|
"-c" = {
|
|
description = "Critical threshold"
|
|
value = "$cloudera_hdfs_files_crit$"
|
|
required = true
|
|
}
|
|
"-m" = {
|
|
description = "Max files count that causes problems (default 140000000)"
|
|
value = "$cloudera_hdfs_files_max$"
|
|
required = false
|
|
}
|
|
}
|
|
}
|