Skip to content

Commit 80676f3

Browse files
committed
Prefix all external command examples for services with "host_name"
Improve examples for changing custom variables The generator got improved so we dont have to do this changes manually in the future. The docs should now be compatible to https://github.com/naemon/naemon.github.io/tree/bootstrap_legacy/documentation/developer/externalcommands Signed-off-by: nook24 <[email protected]>
1 parent 3e89d39 commit 80676f3

File tree

164 files changed

+361
-314
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+361
-314
lines changed

src/documentation/developer/externalcommands/_command.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const command = {% cmd %};
2828
#!/bin/sh
2929
# This is a shell script showing how to submit the {{ command.name }} command
3030
# to Naemon. Adjust variables to fit your environment as necessary.
31-
31+
{{ command?.additionalInformation }}
3232
printf "[%lu] {{ command.name }}{{ command.exampleArgStr }}\n" \
3333
`date +%s` > /var/lib/naemon/naemon.cmd
3434
```

src/documentation/developer/externalcommands/acknowledge_host_problem.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ aside: false
99
---
1010

1111
<script setup>
12-
const command = {"args":[{"name":"host_name","type":"host"},{"name":"sticky","type":"int"},{"name":"notify","type":"bool"},{"name":"persistent","type":"bool"},{"name":"author","type":"str"},{"name":"comment","type":"str"}],"name":"ACKNOWLEDGE_HOST_PROBLEM","description":"Allows you to acknowledge the current problem for the specified host. By acknowledging the current problem, future notifications (for the same host state) are disabled. If the 'sticky' option is set to one (1), the acknowledgement will remain until the host returns to an UP state. Otherwise the acknowledgement will automatically be removed when the host changes state. If the 'notify' option is set to one (1), a notification will be sent out to contacts indicating that the current host problem has been acknowledged. If the 'persistent' option is set to one (1), the comment associated with the acknowledgement will remain once the acknowledgement is removed. If not, the comment will be deleted when the acknowledgement is removed.","classes":["host","comment"],"argsStr":";host_name;sticky;notify;persistent;author;comment","exampleArgStr":";host1;1;1;1;naemonadmin;This is an example comment."};
12+
const command = {"args":[{"name":"host_name","type":"host"},{"name":"sticky","type":"int"},{"name":"notify","type":"bool"},{"name":"persistent","type":"bool"},{"name":"author","type":"str"},{"name":"comment","type":"str"}],"name":"ACKNOWLEDGE_HOST_PROBLEM","description":"Allows you to acknowledge the current problem for the specified host. By acknowledging the current problem, future notifications (for the same host state) are disabled. If the 'sticky' option is set to one (1), the acknowledgement will remain until the host returns to an UP state. Otherwise the acknowledgement will automatically be removed when the host changes state. If the 'notify' option is set to one (1), a notification will be sent out to contacts indicating that the current host problem has been acknowledged. If the 'persistent' option is set to one (1), the comment associated with the acknowledgement will remain once the acknowledgement is removed. If not, the comment will be deleted when the acknowledgement is removed.","classes":["host","comment"],"commandType":4,"argsStr":";host_name;sticky;notify;persistent;author;comment","exampleArgStr":";host1;1;1;1;naemonadmin;This is an example comment."};
1313
</script>
1414

1515
<h3>{{ command.name.replace(/_/g, " ") }}</h3>
@@ -28,7 +28,7 @@ const command = {"args":[{"name":"host_name","type":"host"},{"name":"sticky","ty
2828
#!/bin/sh
2929
# This is a shell script showing how to submit the {{ command.name }} command
3030
# to Naemon. Adjust variables to fit your environment as necessary.
31-
31+
{{ command?.additionalInformation }}
3232
printf "[%lu] {{ command.name }}{{ command.exampleArgStr }}\n" \
3333
`date +%s` > /var/lib/naemon/naemon.cmd
3434
```

src/documentation/developer/externalcommands/acknowledge_host_problem_expire.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ aside: false
99
---
1010

1111
<script setup>
12-
const command = {"args":[{"name":"host_name","type":"host"},{"name":"sticky","type":"int"},{"name":"notify","type":"bool"},{"name":"persistent","type":"bool"},{"name":"end_time","type":"timestamp"},{"name":"author","type":"str"},{"name":"comment","type":"str"}],"name":"ACKNOWLEDGE_HOST_PROBLEM_EXPIRE","description":"Allows you to acknowledge the current problem for the specified host for a limitied time. By acknowledging the current problem, future notifications (for the same host state) are disabled. The 'end_time' option determines the time after which the acknowledgement is cleared automatically. If the 'sticky' option is set to one (1), the acknowledgement will remain until the host returns to an UP state. Otherwise the acknowledgement will automatically be removed when the host changes state. If the 'notify' option is set to one (1), a notification will be sent out to contacts indicating that the current host problem has been acknowledged. If the 'persistent' option is set to one (1), the comment associated with the acknowledgement will remain once the acknowledgement is removed. If not, the comment will be deleted when the acknowledgement is removed.","classes":["host","comment"],"argsStr":";host_name;sticky;notify;persistent;end_time;author;comment","exampleArgStr":";host1;1;1;1;1478638441;naemonadmin;This is an example comment."};
12+
const command = {"args":[{"name":"host_name","type":"host"},{"name":"sticky","type":"int"},{"name":"notify","type":"bool"},{"name":"persistent","type":"bool"},{"name":"end_time","type":"timestamp"},{"name":"author","type":"str"},{"name":"comment","type":"str"}],"name":"ACKNOWLEDGE_HOST_PROBLEM_EXPIRE","description":"Allows you to acknowledge the current problem for the specified host for a limitied time. By acknowledging the current problem, future notifications (for the same host state) are disabled. The 'end_time' option determines the time after which the acknowledgement is cleared automatically. If the 'sticky' option is set to one (1), the acknowledgement will remain until the host returns to an UP state. Otherwise the acknowledgement will automatically be removed when the host changes state. If the 'notify' option is set to one (1), a notification will be sent out to contacts indicating that the current host problem has been acknowledged. If the 'persistent' option is set to one (1), the comment associated with the acknowledgement will remain once the acknowledgement is removed. If not, the comment will be deleted when the acknowledgement is removed.","classes":["host","comment"],"commandType":4,"argsStr":";host_name;sticky;notify;persistent;end_time;author;comment","exampleArgStr":";host1;1;1;1;1478638441;naemonadmin;This is an example comment."};
1313
</script>
1414

1515
<h3>{{ command.name.replace(/_/g, " ") }}</h3>
@@ -28,7 +28,7 @@ const command = {"args":[{"name":"host_name","type":"host"},{"name":"sticky","ty
2828
#!/bin/sh
2929
# This is a shell script showing how to submit the {{ command.name }} command
3030
# to Naemon. Adjust variables to fit your environment as necessary.
31-
31+
{{ command?.additionalInformation }}
3232
printf "[%lu] {{ command.name }}{{ command.exampleArgStr }}\n" \
3333
`date +%s` > /var/lib/naemon/naemon.cmd
3434
```

src/documentation/developer/externalcommands/acknowledge_svc_problem.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ aside: false
99
---
1010

1111
<script setup>
12-
const command = {"args":[{"name":"service","type":"service"},{"name":"sticky","type":"int"},{"name":"notify","type":"bool"},{"name":"persistent","type":"bool"},{"name":"author","type":"str"},{"name":"comment","type":"str"}],"name":"ACKNOWLEDGE_SVC_PROBLEM","description":"Allows you to acknowledge the current problem for the specified service. By acknowledging the current problem, future notifications (for the same servicestate) are disabled. If the 'sticky' option is set to one (1), the acknowledgement will remain until the service returns to an OK state. Otherwise the acknowledgement will automatically be removed when the service changes state. If the 'notify' option is set to one (1), a notification will be sent out to contacts indicating that the current service problem has been acknowledged. If the 'persistent' option is set to one (1), the comment associated with the acknowledgement will remain once the acknowledgement is removed. If not, the comment will be deleted when the acknowledgement is removed.","classes":["service","comment"],"argsStr":";service;sticky;notify;persistent;author;comment","exampleArgStr":";service1;1;1;1;naemonadmin;This is an example comment."};
12+
const command = {"args":[{"name":"service_description","type":"service"},{"name":"sticky","type":"int"},{"name":"notify","type":"bool"},{"name":"persistent","type":"bool"},{"name":"author","type":"str"},{"name":"comment","type":"str"}],"name":"ACKNOWLEDGE_SVC_PROBLEM","description":"Allows you to acknowledge the current problem for the specified service. By acknowledging the current problem, future notifications (for the same servicestate) are disabled. If the 'sticky' option is set to one (1), the acknowledgement will remain until the service returns to an OK state. Otherwise the acknowledgement will automatically be removed when the service changes state. If the 'notify' option is set to one (1), a notification will be sent out to contacts indicating that the current service problem has been acknowledged. If the 'persistent' option is set to one (1), the comment associated with the acknowledgement will remain once the acknowledgement is removed. If not, the comment will be deleted when the acknowledgement is removed.","classes":["service","comment"],"commandType":6,"argsStr":";host_name;service_description;sticky;notify;persistent;author;comment","exampleArgStr":";host1;service1;1;1;1;naemonadmin;This is an example comment."};
1313
</script>
1414

1515
<h3>{{ command.name.replace(/_/g, " ") }}</h3>
@@ -28,7 +28,7 @@ const command = {"args":[{"name":"service","type":"service"},{"name":"sticky","t
2828
#!/bin/sh
2929
# This is a shell script showing how to submit the {{ command.name }} command
3030
# to Naemon. Adjust variables to fit your environment as necessary.
31-
31+
{{ command?.additionalInformation }}
3232
printf "[%lu] {{ command.name }}{{ command.exampleArgStr }}\n" \
3333
`date +%s` > /var/lib/naemon/naemon.cmd
3434
```

src/documentation/developer/externalcommands/acknowledge_svc_problem_expire.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ aside: false
99
---
1010

1111
<script setup>
12-
const command = {"args":[{"name":"service","type":"service"},{"name":"sticky","type":"int"},{"name":"notify","type":"bool"},{"name":"persistent","type":"bool"},{"name":"end_time","type":"timestamp"},{"name":"author","type":"str"},{"name":"comment","type":"str"}],"name":"ACKNOWLEDGE_SVC_PROBLEM_EXPIRE","description":"Allows you to acknowledge the current problem for the specified service. By acknowledging the current problem, future notifications (for the same servicestate) are disabled. The 'end_time' option determines the time after which the acknowledgement is cleared automatically. If the 'sticky' option is set to one (1), the acknowledgement will remain until the service returns to an OK state. Otherwise the acknowledgement will automatically be removed when the service changes state. If the 'notify' option is set to one (1), a notification will be sent out to contacts indicating that the current service problem has been acknowledged. If the 'persistent' option is set to one (1), the comment associated with the acknowledgement will remain once the acknowledgement is removed. If not, the comment will be deleted when the acknowledgement is removed.","classes":["service","comment"],"argsStr":";service;sticky;notify;persistent;end_time;author;comment","exampleArgStr":";service1;1;1;1;1478638441;naemonadmin;This is an example comment."};
12+
const command = {"args":[{"name":"service_description","type":"service"},{"name":"sticky","type":"int"},{"name":"notify","type":"bool"},{"name":"persistent","type":"bool"},{"name":"end_time","type":"timestamp"},{"name":"author","type":"str"},{"name":"comment","type":"str"}],"name":"ACKNOWLEDGE_SVC_PROBLEM_EXPIRE","description":"Allows you to acknowledge the current problem for the specified service. By acknowledging the current problem, future notifications (for the same servicestate) are disabled. The 'end_time' option determines the time after which the acknowledgement is cleared automatically. If the 'sticky' option is set to one (1), the acknowledgement will remain until the service returns to an OK state. Otherwise the acknowledgement will automatically be removed when the service changes state. If the 'notify' option is set to one (1), a notification will be sent out to contacts indicating that the current service problem has been acknowledged. If the 'persistent' option is set to one (1), the comment associated with the acknowledgement will remain once the acknowledgement is removed. If not, the comment will be deleted when the acknowledgement is removed.","classes":["service","comment"],"commandType":6,"argsStr":";host_name;service_description;sticky;notify;persistent;end_time;author;comment","exampleArgStr":";host1;service1;1;1;1;1478638441;naemonadmin;This is an example comment."};
1313
</script>
1414

1515
<h3>{{ command.name.replace(/_/g, " ") }}</h3>
@@ -28,7 +28,7 @@ const command = {"args":[{"name":"service","type":"service"},{"name":"sticky","t
2828
#!/bin/sh
2929
# This is a shell script showing how to submit the {{ command.name }} command
3030
# to Naemon. Adjust variables to fit your environment as necessary.
31-
31+
{{ command?.additionalInformation }}
3232
printf "[%lu] {{ command.name }}{{ command.exampleArgStr }}\n" \
3333
`date +%s` > /var/lib/naemon/naemon.cmd
3434
```

src/documentation/developer/externalcommands/add_host_comment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ aside: false
99
---
1010

1111
<script setup>
12-
const command = {"args":[{"name":"host_name","type":"host"},{"name":"persistent","type":"bool"},{"name":"author","type":"str"},{"name":"comment","type":"str"}],"name":"ADD_HOST_COMMENT","description":"This command is used to add a comment for the specified host. If you work with other administrators, you may find it useful to share information about a host that is having problems if more than one of you may be working on it. If you do not check the 'persistent' option, the comment will be automatically be deleted at the the next program restarted.","classes":["host","comment"],"argsStr":";host_name;persistent;author;comment","exampleArgStr":";host1;1;naemonadmin;This is an example comment."};
12+
const command = {"args":[{"name":"host_name","type":"host"},{"name":"persistent","type":"bool"},{"name":"author","type":"str"},{"name":"comment","type":"str"}],"name":"ADD_HOST_COMMENT","description":"This command is used to add a comment for the specified host. If you work with other administrators, you may find it useful to share information about a host that is having problems if more than one of you may be working on it. If you do not check the 'persistent' option, the comment will be automatically be deleted at the the next program restarted.","classes":["host","comment"],"commandType":4,"argsStr":";host_name;persistent;author;comment","exampleArgStr":";host1;1;naemonadmin;This is an example comment."};
1313
</script>
1414

1515
<h3>{{ command.name.replace(/_/g, " ") }}</h3>
@@ -28,7 +28,7 @@ const command = {"args":[{"name":"host_name","type":"host"},{"name":"persistent"
2828
#!/bin/sh
2929
# This is a shell script showing how to submit the {{ command.name }} command
3030
# to Naemon. Adjust variables to fit your environment as necessary.
31-
31+
{{ command?.additionalInformation }}
3232
printf "[%lu] {{ command.name }}{{ command.exampleArgStr }}\n" \
3333
`date +%s` > /var/lib/naemon/naemon.cmd
3434
```

src/documentation/developer/externalcommands/add_svc_comment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ aside: false
99
---
1010

1111
<script setup>
12-
const command = {"args":[{"name":"service","type":"service"},{"name":"persistent","type":"bool"},{"name":"author","type":"str"},{"name":"comment","type":"str"}],"name":"ADD_SVC_COMMENT","description":"This command is used to add a comment for the specified service. If you work with other administrators, you may find it useful to share information about a host or service that is having problems if more than one of you may be working on it. If you do not check the 'persistent' option, the comment will automatically be deleted at the next program restart.","classes":["service","comment"],"argsStr":";service;persistent;author;comment","exampleArgStr":";service1;1;naemonadmin;This is an example comment."};
12+
const command = {"args":[{"name":"service_description","type":"service"},{"name":"persistent","type":"bool"},{"name":"author","type":"str"},{"name":"comment","type":"str"}],"name":"ADD_SVC_COMMENT","description":"This command is used to add a comment for the specified service. If you work with other administrators, you may find it useful to share information about a host or service that is having problems if more than one of you may be working on it. If you do not check the 'persistent' option, the comment will automatically be deleted at the next program restart.","classes":["service","comment"],"commandType":6,"argsStr":";host_name;service_description;persistent;author;comment","exampleArgStr":";host1;service1;1;naemonadmin;This is an example comment."};
1313
</script>
1414

1515
<h3>{{ command.name.replace(/_/g, " ") }}</h3>
@@ -28,7 +28,7 @@ const command = {"args":[{"name":"service","type":"service"},{"name":"persistent
2828
#!/bin/sh
2929
# This is a shell script showing how to submit the {{ command.name }} command
3030
# to Naemon. Adjust variables to fit your environment as necessary.
31-
31+
{{ command?.additionalInformation }}
3232
printf "[%lu] {{ command.name }}{{ command.exampleArgStr }}\n" \
3333
`date +%s` > /var/lib/naemon/naemon.cmd
3434
```

src/documentation/developer/externalcommands/change_contact_host_notification_timeperiod.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ aside: false
99
---
1010

1111
<script setup>
12-
const command = {"args":[{"name":"contact_name","type":"contact"},{"name":"notification_timeperiod","type":"timeperiod"}],"name":"CHANGE_CONTACT_HOST_NOTIFICATION_TIMEPERIOD","description":"Changes the host notification timeperiod for a particular contact to what is specified by the 'notification_timeperiod' option. The 'notification_timeperiod' option should be the short name of the timeperiod that is to be used as the contact's host notification timeperiod. The timeperiod must have been configured in Naemon before it was last (re)started.","classes":["host","contact"],"argsStr":";contact_name;notification_timeperiod","exampleArgStr":";naemonadmin;24x7"};
12+
const command = {"args":[{"name":"contact_name","type":"contact"},{"name":"notification_timeperiod","type":"timeperiod"}],"name":"CHANGE_CONTACT_HOST_NOTIFICATION_TIMEPERIOD","description":"Changes the host notification timeperiod for a particular contact to what is specified by the 'notification_timeperiod' option. The 'notification_timeperiod' option should be the short name of the timeperiod that is to be used as the contact's host notification timeperiod. The timeperiod must have been configured in Naemon before it was last (re)started.","classes":["host","contact"],"commandType":1,"argsStr":";contact_name;notification_timeperiod","exampleArgStr":";naemonadmin;24x7"};
1313
</script>
1414

1515
<h3>{{ command.name.replace(/_/g, " ") }}</h3>
@@ -28,7 +28,7 @@ const command = {"args":[{"name":"contact_name","type":"contact"},{"name":"notif
2828
#!/bin/sh
2929
# This is a shell script showing how to submit the {{ command.name }} command
3030
# to Naemon. Adjust variables to fit your environment as necessary.
31-
31+
{{ command?.additionalInformation }}
3232
printf "[%lu] {{ command.name }}{{ command.exampleArgStr }}\n" \
3333
`date +%s` > /var/lib/naemon/naemon.cmd
3434
```

src/documentation/developer/externalcommands/change_contact_modattr.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ aside: false
99
---
1010

1111
<script setup>
12-
const command = {"args":[{"name":"contact_name","type":"contact"},{"name":"value","type":"ulong"}],"name":"CHANGE_CONTACT_MODATTR","description":"This command changes the modified attributes value for the specified contact. Modified attributes values are used by Naemon to determine which object properties should be retained across program restarts. Thus, modifying the value of the attributes can affect data retention. This is an advanced option and should only be used by people who are intimately familiar with the data retention logic in Naemon.","classes":["contact"],"argsStr":";contact_name;value","exampleArgStr":";naemonadmin;0"};
12+
const command = {"args":[{"name":"contact_name","type":"contact"},{"name":"value","type":"ulong"}],"name":"CHANGE_CONTACT_MODATTR","description":"This command changes the modified attributes value for the specified contact. Modified attributes values are used by Naemon to determine which object properties should be retained across program restarts. Thus, modifying the value of the attributes can affect data retention. This is an advanced option and should only be used by people who are intimately familiar with the data retention logic in Naemon.","classes":["contact"],"commandType":1,"argsStr":";contact_name;value","exampleArgStr":";naemonadmin;0"};
1313
</script>
1414

1515
<h3>{{ command.name.replace(/_/g, " ") }}</h3>
@@ -28,7 +28,7 @@ const command = {"args":[{"name":"contact_name","type":"contact"},{"name":"value
2828
#!/bin/sh
2929
# This is a shell script showing how to submit the {{ command.name }} command
3030
# to Naemon. Adjust variables to fit your environment as necessary.
31-
31+
{{ command?.additionalInformation }}
3232
printf "[%lu] {{ command.name }}{{ command.exampleArgStr }}\n" \
3333
`date +%s` > /var/lib/naemon/naemon.cmd
3434
```

0 commit comments

Comments
 (0)