Skip to content

Commit

Permalink
Currently the documentation for CHANGE_CUSTOM_*_VAR is wrong.
Browse files Browse the repository at this point in the history
All example are shown with a leading underscore like "_SOMEVAR"
which does not work.

To change the value of the variable, the name does not have an underscore as prefix.

Signed-off-by: nook24 <info@nook24.eu>
  • Loading branch information
nook24 committed Feb 5, 2024
1 parent 8fc2052 commit af34cc2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ Changes the value of a custom contact variable.
#!/bin/sh
# This is a sample shell script showing how you can submit the CHANGE_CUSTOM_CONTACT_VAR command
# to Naemon. Adjust variables to fit your environment as necessary.
# This will change value of the custom variable: $_CONTACTSOMEVAR$

printf "[%lu] CHANGE_CUSTOM_CONTACT_VAR;naemonadmin;_SOMEVAR;some new value\n" `date +%s` > /var/lib/naemon/naemon.cmd
printf "[%lu] CHANGE_CUSTOM_CONTACT_VAR;naemonadmin;SOMEVAR;some new value\n" `date +%s` > /var/lib/naemon/naemon.cmd
```


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ Changes the value of a custom host variable.
#!/bin/sh
# This is a sample shell script showing how you can submit the CHANGE_CUSTOM_HOST_VAR command
# to Naemon. Adjust variables to fit your environment as necessary.
# This will change value of the custom variable: $_HOSTSOMEVAR$

printf "[%lu] CHANGE_CUSTOM_HOST_VAR;host1;_SOMEVAR;some new value\n" `date +%s` > /var/lib/naemon/naemon.cmd
printf "[%lu] CHANGE_CUSTOM_HOST_VAR;host1;SOMEVAR;some new value\n" `date +%s` > /var/lib/naemon/naemon.cmd
```


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ Changes the value of a custom service variable.
#!/bin/sh
# This is a sample shell script showing how you can submit the CHANGE_CUSTOM_SVC_VAR command
# to Naemon. Adjust variables to fit your environment as necessary.
# This will change value of the custom variable: $_SERVICESOMEVAR$

printf "[%lu] CHANGE_CUSTOM_SVC_VAR;host1;service1;_SOMEVAR;some new value\n" `date +%s` > /var/lib/naemon/naemon.cmd
printf "[%lu] CHANGE_CUSTOM_SVC_VAR;host1;service1;SOMEVAR;some new value\n" `date +%s` > /var/lib/naemon/naemon.cmd
```


Expand Down

0 comments on commit af34cc2

Please sign in to comment.