Skip to content

Commit

Permalink
add LOG command to external commands list
Browse files Browse the repository at this point in the history
  • Loading branch information
sni committed Sep 30, 2024
1 parent 193d0ba commit 7c6c894
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions documentation/developer/externalcommands/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ Filter by Category: <select onchange="_update_cmd_filter(this.value)">
<h5 class='commands service'><a href='enable_svc_event_handler.html'>ENABLE_SVC_EVENT_HANDLER</a></h5>
<h5 class='commands service'><a href='enable_svc_flap_detection.html'>ENABLE_SVC_FLAP_DETECTION</a></h5>
<h5 class='commands notification service'><a href='enable_svc_notifications.html'>ENABLE_SVC_NOTIFICATIONS</a></h5>
<h5 class='commands process'><a href='log.html'>LOG</a></h5>
<h5 class='commands process'><a href='process_file.html'>PROCESS_FILE</a></h5>
<h5 class='commands host'><a href='process_host_check_result.html'>PROCESS_HOST_CHECK_RESULT</a></h5>
<h5 class='commands service'><a href='process_service_check_result.html'>PROCESS_SERVICE_CHECK_RESULT</a></h5>
Expand Down
34 changes: 34 additions & 0 deletions documentation/developer/externalcommands/log.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
layout: default
title: External Command Reference
---

<!--
************************************************
* AUTO GENERATED PAGE - USE ./update SCRIPT
************************************************
-->

<span class="glyphicon glyphicon-arrow-up"></span><a href="index.html"> External Commands Reference</a> - LOG<br>


#### Command Format:

`LOG;any text`

#### Description:

Adds custom entry to the default log file.

#### Shell Script Usage Example:

```sh
#!/bin/sh
# This is a sample shell script showing how you can submit the LOG command
# to Naemon. Adjust variables to fit your environment as necessary.

printf "[%lu] LOG;SERVICE NOTE: testhost;event handler restarted service successfully\n" `date +%s` > /var/lib/naemon/naemon.cmd
```



0 comments on commit 7c6c894

Please sign in to comment.