Skip to content

Commit

Permalink
refactor: rename to hmcli
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommi2Day committed Jun 22, 2024
1 parent c56065c commit 536aac7
Show file tree
Hide file tree
Showing 17 changed files with 158 additions and 148 deletions.
35 changes: 18 additions & 17 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
project_name: check_hm
project_name: hmcli

builds:
- env:
Expand Down Expand Up @@ -54,32 +54,33 @@ archives:
- goos: windows
format: zip
files:
- Icinga2_basket.json
- "*.md"
- LICENSE
- src: check_hm_config.yaml
dst: check_hm.yaml
strip_parent_binary_folder: true
- Icinga2_basket.json
- "*.md"
- LICENSE
- src: hmcli_config.yaml
dst: hmcli.yaml

nfpms:
-
id: packages
# dont use {{ .ProjectName }} here :(
package_name: check_hm
package_name: hmcli
file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
# builds:
license: GPL-3
bindir: /usr/lib/nagios/plugins
vendor: Tommi2Day
maintainer: "Tommi2Day <[email protected]>"
description: |-
Tool and Nagios/Icinga check plugin for Homematic/Raspberrymatic based on XMLAPI AddOn
Query Tool and Nagios/Icinga check plugin for Homematic/Raspberrymatic with XMLAPI
formats:
- rpm
- deb
# dependencies:
provides:
# dont use {{ .ProjectName }} here :(
- hmcli
replaces:
- check_hm
contents:
- src: "*.md"
Expand All @@ -88,22 +89,22 @@ nfpms:
dst: /usr/share/doc/{{ .ProjectName }}/Icinga2_basket.json
- src: LICENSE
dst: /usr/share/doc/{{ .ProjectName }}/LICENSE
- src: check_hm_config.yaml
dst: /usr/share/doc/{{ .ProjectName }}/check_hm.yaml
- src: check_hm_config.yaml
dst: /etc/nagios-plugins/config/check_hm.yaml
- src: hmcli_config.yaml
dst: /usr/share/doc/{{ .ProjectName }}/hmcli.yaml
- src: hmcli_config.yaml
dst: /etc/nagios-plugins/config/hmcli.yaml
type: config
- src: /usr/lib/nagios/plugins/check_hm
dst: /usr/bin/check_hm
- src: /usr/lib/nagios/plugins/hmcli
dst: /usr/bin/hmcli
type: "symlink"


release:
github:
owner: tommi2day
name: check_hm
name: hmcli
replace_existing_draft: true
draft: true
header: |
## Check_HM Release {{ .Tag }} ({{ time "2006-01-02" }})
## hmcli Release {{ .Tag }} ({{ time "2006-01-02" }})
target_commitish: '{{ .Commit }}'
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Changelog check_hm
# Changelog hmcli

## [v1.2.0 - 2024-06-22]
### Changed
- renamed from check_hm to hmcli
- update dependencies

## [v1.1.1 - 2024-05-25]
### Changed
Expand Down
8 changes: 4 additions & 4 deletions Icinga2.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Icinga2 configuration

These are simple examples how to use the check_hm plugin with Icinga2.
These are simple examples how to use the hmcli plugin with Icinga2.

## Definitions

Expand All @@ -16,17 +16,17 @@ for your convenience, a icinga director basket is available [here](Icinga2_baske
```conf
object CheckCommand "hm" {
import "plugin-check-command"
command = [ PluginDir + "/check_hm" ]
command = [ PluginDir + "/hmcli" ]
arguments += {
"(no key)" = {
description = "check_hm command"
description = "hmcli command"
order = 1
required = true
skip_key = true
value = "$hm_command$"
}
"(no key.2)" = {
description = "check_hm Subcommand"
description = "hmcli Subcommand"
order = 2
skip_key = true
value = "$hm_subcommand$"
Expand Down
42 changes: 21 additions & 21 deletions Icinga2_basket.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"hm": {
"arguments": {
"(no key)": {
"description": "check_hm command",
"description": "hmcli command",
"required": true,
"skip_key": true,
"value": "$hm_command$",
"order": "1"
},
"(no key.2)": {
"description": "check_hm Subcommand",
"description": "hmcli Subcommand",
"skip_key": true,
"value": "$hm_subcommand$",
"order": "2"
Expand Down Expand Up @@ -58,7 +58,7 @@
"value": "$hm_warning$"
}
},
"command": "check_hm",
"command": "hmcli",
"fields": [
{
"datafield_id": 113,
Expand Down Expand Up @@ -164,31 +164,31 @@
"settings": {
"visibility": "visible"
},
"category": "check_hm"
"category": "hmcli"
},
"111": {
"uuid": "f06ee85b-9e8b-4e7b-a559-b950c92e0929",
"varname": "hm_command",
"caption": "hm_command",
"description": "check_hm sub command",
"description": "hmcli sub command",
"datatype": "Icinga\\Module\\Director\\DataType\\DataTypeString",
"format": null,
"settings": {
"visibility": "visible"
},
"category": "check_hm"
"category": "hmcli"
},
"106": {
"uuid": "59a14db9-a752-49ba-a728-abe447672037",
"varname": "hm_config",
"caption": "hm_config",
"description": "path to check_hm.yaml (if created)",
"description": "path to hmcli.yaml (if created)",
"datatype": "Icinga\\Module\\Director\\DataType\\DataTypeString",
"format": null,
"settings": {
"visibility": "visible"
},
"category": "check_hm"
"category": "hmcli"
},
"108": {
"uuid": "8e08c513-7a08-406d-ae31-15998319bbcb",
Expand All @@ -200,7 +200,7 @@
"settings": {
"visibility": "visible"
},
"category": "check_hm"
"category": "hmcli"
},
"116": {
"uuid": "11018017-0eee-4ea4-8b55-8b33a8b3e4e2",
Expand All @@ -212,7 +212,7 @@
"settings": {
"visibility": "visible"
},
"category": "check_hm"
"category": "hmcli"
},
"109": {
"uuid": "b0e4a4d2-5ba6-45a7-8b1a-f62c0e9b775d",
Expand All @@ -224,7 +224,7 @@
"settings": {
"visibility": "visible"
},
"category": "check_hm"
"category": "hmcli"
},
"115": {
"uuid": "fa6f9466-7315-4786-b963-492c6a138a6c",
Expand All @@ -236,7 +236,7 @@
"settings": {
"visibility": "visible"
},
"category": "check_hm"
"category": "hmcli"
},
"114": {
"uuid": "253aecab-8677-44e2-b0f2-a12732df5dd0",
Expand All @@ -248,7 +248,7 @@
"settings": {
"visibility": "visible"
},
"category": "check_hm"
"category": "hmcli"
},
"110": {
"uuid": "bc2e2b46-3a13-4714-b298-927c91f0ab4e",
Expand All @@ -260,19 +260,19 @@
"settings": {
"visibility": "visible"
},
"category": "check_hm"
"category": "hmcli"
},
"112": {
"uuid": "9af2c492-78f6-47a4-b0b0-379c63fe4c59",
"varname": "hm_subcommand",
"caption": "hm_subcommand",
"description": "check_hm subcommand (e.g \"check\")",
"description": "hmcli subcommand (e.g \"check\")",
"datatype": "Icinga\\Module\\Director\\DataType\\DataTypeString",
"format": null,
"settings": {
"visibility": "visible"
},
"category": "check_hm"
"category": "hmcli"
},
"105": {
"uuid": "876c01e0-6dda-4890-9cda-a96c02109adb",
Expand All @@ -284,7 +284,7 @@
"settings": {
"visibility": "visible"
},
"category": "check_hm"
"category": "hmcli"
},
"104": {
"uuid": "2bafae55-29ee-49fa-8f64-b9075450cfd5",
Expand All @@ -296,7 +296,7 @@
"settings": {
"visibility": "visible"
},
"category": "check_hm"
"category": "hmcli"
},
"107": {
"uuid": "906bf45c-f533-4a01-b17f-a7dcd265ace3",
Expand All @@ -308,12 +308,12 @@
"settings": {
"visibility": "visible"
},
"category": "check_hm"
"category": "hmcli"
}
},
"DatafieldCategory": {
"check_hm": {
"category_name": "check_hm",
"hmcli": {
"category_name": "hmcli",
"description": null,
"originalId": "14"
}
Expand Down
Loading

0 comments on commit 536aac7

Please sign in to comment.