Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add LOG command to external commands list #161

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
```



Loading