Skip to content

Commit

Permalink
Merge pull request #136 from ccztux/devel
Browse files Browse the repository at this point in the history
Release 2.2.10
  • Loading branch information
ccztux authored Dec 10, 2020
2 parents 46a0df3 + 4a93c64 commit 6d75974
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 68 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
# Project website: https://github.com/ccztux/modpd
#
# Last Modification: Christian Zettel (ccztux)
# 2020-12-09
# 2020-12-10
#
# Version 2.2.9
# Version 2.2.10
#
# Description: Makefile for the modpd NEB module
#
Expand Down
82 changes: 41 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ service nagios status
Check if the modpd NEB module was loaded by Nagios®:
```bash
[root@lab01]:~# grep -i modpd /usr/local/nagios/var/nagios.log
[1582272717] modpd: Copyright © 2017-2020 Christian Zettel (ccztux), all rights reserved, Version: 2.2.9
[1582272717] modpd: Copyright © 2017-2020 Christian Zettel (ccztux), all rights reserved, Version: 2.2.10
[1582272717] modpd: Starting...
[1582272717] Event broker module '/usr/local/nagios/include/modpd.o' initialized successfully.
```
Expand Down Expand Up @@ -336,8 +336,8 @@ vim /usr/local/nagios/etc/send_nsca.cfg
Usage: modpd OPTIONS
Author: Christian Zettel (ccztux)
Last modification: 2020-12-09
Version: 2.2.9
Last modification: 2020-12-10
Version: 2.2.10
Description: modpd (Monitoring Obsessing Data Processor Daemon)
Expand Down Expand Up @@ -365,9 +365,9 @@ OPTIONS:
# Project website: https://github.com/ccztux/modpd
#
# Last Modification: Christian Zettel (ccztux)
# 2020-12-09
# 2020-12-10
#
# Version 2.2.9
# Version 2.2.10
#
# Description: Config file for modpd (Monitoring Obsessing Data Processor Daemon)
#
Expand Down Expand Up @@ -613,48 +613,48 @@ modpd (PID 6931) is running [ OK ]
Stopping modpd [ OK ]
[root@lab01]:~# grep 6931 /usr/local/modpd/var/log/modpd.log
2020-12-09 12:07:53 | 6931 | setLock | Script lock directory exists and permissions are ok
2020-12-09 12:07:53 | 6931 | setLock | Setting lock...
2020-12-09 12:07:53 | 6931 | setLock | Setting lock was successful
2020-12-09 12:07:53 | 6931 | checkNamedPipe | Check if named pipe: '/usr/local/modpd/var/rw/modpd.cmd' exists and if it is read/writeable...
2020-12-09 12:07:53 | 6931 | checkNamedPipe | Named pipe doesnt exist
2020-12-09 12:07:53 | 6931 | createNamedPipe | Creating named pipe...
2020-12-09 12:07:53 | 6931 | createNamedPipe | Creating named pipe was successful
2020-12-09 12:07:53 | 6931 | buildJobCommand | Building job command...
2020-12-09 12:07:53 | 6931 | buildJobCommand | We build the following job command: '/usr/bin/timeout --signal=TERM 8 /usr/bin/php /usr/local/modpd/libexec/send_nrdp.php --usestdin --delim="" --token="[HIDDEN FOR SECURITY]" --url=https://nrdpuser:[HIDDEN FOR SECURITY]@10.0.0.74:443/nrdp'
2020-12-09 12:07:53 | 6931 | _main | Ready to handle jobs...
2020-12-09 12:08:24 | 6931 | logStats | ---- Stats for the last 31 seconds ----
2020-12-09 12:08:24 | 6931 | logStats | modpd is running: 0d 0h 0m 31s
2020-12-09 12:08:24 | 6931 | logStats | Total processed jobs: '4', successful processed jobs: '4', unsuccessful processed jobs: '0', timed out jobs: '0'
2020-12-09 12:08:24 | 6931 | logStats | Handled host checks: '1011', handled service checks: '751', invalid datasets received: '0'
2020-12-09 12:08:54 | 6931 | logStats | ---- Stats for the last 30 seconds ----
2020-12-09 12:08:54 | 6931 | logStats | modpd is running: 0d 0h 1m 1s
2020-12-09 12:08:54 | 6931 | logStats | Total processed jobs: '5', successful processed jobs: '5', unsuccessful processed jobs: '0', timed out jobs: '0'
2020-12-09 12:08:54 | 6931 | logStats | Handled host checks: '1095', handled service checks: '751', invalid datasets received: '0'
2020-12-09 12:09:21 | 6931 | signalHandler | Caught: 'SIGTERM', preparing for shutdown...
2020-12-09 12:09:21 | 6931 | logStats | ---- Stats for the last 27 seconds ----
2020-12-09 12:09:21 | 6931 | logStats | modpd is running: 0d 0h 1m 28s
2020-12-09 12:09:21 | 6931 | logStats | Total processed jobs: '5', successful processed jobs: '5', unsuccessful processed jobs: '0', timed out jobs: '0'
2020-12-09 12:09:21 | 6931 | logStats | Handled host checks: '1018', handled service checks: '749', invalid datasets received: '0'
2020-12-09 12:09:21 | 6931 | signalHandler | Caught: 'EXIT', shutting down...
2020-12-09 12:09:21 | 6931 | checkNamedPipe | Check if named pipe: '/usr/local/modpd/var/rw/modpd.cmd' exists and if it is read/writeable...
2020-12-09 12:09:22 | 6931 | checkNamedPipe | Named pipe exists and it is read/writeable
2020-12-09 12:09:22 | 6931 | removeNamedPipe | Remove named pipe...
2020-12-09 12:09:22 | 6931 | removeNamedPipe | Removing named pipe was successful
2020-12-09 12:09:22 | 6931 | checkLock | Check if lock file: '/usr/local/modpd/var/lock/modpd.lock' exists and if it is read and writeable...
2020-12-09 12:09:22 | 6931 | checkLock | Lock file exists and it is read/writeable
2020-12-09 12:09:22 | 6931 | removeLock | Removing lock...
2020-12-09 12:09:22 | 6931 | removeLock | Removing lock was successful
2020-12-09 12:09:22 | 6931 | signalHandler | Exitcode: '143'
2020-12-09 12:09:22 | 6931 | signalHandler | modpd was running: 0d 0h 1m 29s
2020-12-09 12:09:22 | 6931 | signalHandler | Bye, bye...
2020-12-10 12:07:53 | 6931 | setLock | Script lock directory exists and permissions are ok
2020-12-10 12:07:53 | 6931 | setLock | Setting lock...
2020-12-10 12:07:53 | 6931 | setLock | Setting lock was successful
2020-12-10 12:07:53 | 6931 | checkNamedPipe | Check if named pipe: '/usr/local/modpd/var/rw/modpd.cmd' exists and if it is read/writeable...
2020-12-10 12:07:53 | 6931 | checkNamedPipe | Named pipe doesnt exist
2020-12-10 12:07:53 | 6931 | createNamedPipe | Creating named pipe...
2020-12-10 12:07:53 | 6931 | createNamedPipe | Creating named pipe was successful
2020-12-10 12:07:53 | 6931 | buildJobCommand | Building job command...
2020-12-10 12:07:53 | 6931 | buildJobCommand | We build the following job command: '/usr/bin/timeout --signal=TERM 8 /usr/bin/php /usr/local/modpd/libexec/send_nrdp.php --usestdin --delim="" --token="[HIDDEN FOR SECURITY]" --url=https://nrdpuser:[HIDDEN FOR SECURITY]@10.0.0.74:443/nrdp'
2020-12-10 12:07:53 | 6931 | _main | Ready to handle jobs...
2020-12-10 12:08:24 | 6931 | logStats | ---- Stats for the last 31 seconds ----
2020-12-10 12:08:24 | 6931 | logStats | modpd is running: 0d 0h 0m 31s
2020-12-10 12:08:24 | 6931 | logStats | Total processed jobs: '4', successful processed jobs: '4', unsuccessful processed jobs: '0', timed out jobs: '0'
2020-12-10 12:08:24 | 6931 | logStats | Handled host checks: '1011', handled service checks: '751', invalid datasets received: '0'
2020-12-10 12:08:54 | 6931 | logStats | ---- Stats for the last 30 seconds ----
2020-12-10 12:08:54 | 6931 | logStats | modpd is running: 0d 0h 1m 1s
2020-12-10 12:08:54 | 6931 | logStats | Total processed jobs: '5', successful processed jobs: '5', unsuccessful processed jobs: '0', timed out jobs: '0'
2020-12-10 12:08:54 | 6931 | logStats | Handled host checks: '1095', handled service checks: '751', invalid datasets received: '0'
2020-12-10 12:09:21 | 6931 | signalHandler | Caught: 'SIGTERM', preparing for shutdown...
2020-12-10 12:09:21 | 6931 | logStats | ---- Stats for the last 27 seconds ----
2020-12-10 12:09:21 | 6931 | logStats | modpd is running: 0d 0h 1m 28s
2020-12-10 12:09:21 | 6931 | logStats | Total processed jobs: '5', successful processed jobs: '5', unsuccessful processed jobs: '0', timed out jobs: '0'
2020-12-10 12:09:21 | 6931 | logStats | Handled host checks: '1018', handled service checks: '749', invalid datasets received: '0'
2020-12-10 12:09:21 | 6931 | signalHandler | Caught: 'EXIT', shutting down...
2020-12-10 12:09:21 | 6931 | checkNamedPipe | Check if named pipe: '/usr/local/modpd/var/rw/modpd.cmd' exists and if it is read/writeable...
2020-12-10 12:09:22 | 6931 | checkNamedPipe | Named pipe exists and it is read/writeable
2020-12-10 12:09:22 | 6931 | removeNamedPipe | Remove named pipe...
2020-12-10 12:09:22 | 6931 | removeNamedPipe | Removing named pipe was successful
2020-12-10 12:09:22 | 6931 | checkLock | Check if lock file: '/usr/local/modpd/var/lock/modpd.lock' exists and if it is read and writeable...
2020-12-10 12:09:22 | 6931 | checkLock | Lock file exists and it is read/writeable
2020-12-10 12:09:22 | 6931 | removeLock | Removing lock...
2020-12-10 12:09:22 | 6931 | removeLock | Removing lock was successful
2020-12-10 12:09:22 | 6931 | signalHandler | Exitcode: '143'
2020-12-10 12:09:22 | 6931 | signalHandler | modpd was running: 0d 0h 1m 29s
2020-12-10 12:09:22 | 6931 | signalHandler | Bye, bye...
```


## modpd NEB module log snippet
```
[root@lab01]:~# grep -i modpd /usr/local/nagios/var/nagios.log
[1607079032] modpd: Copyright © 2017-2020 Christian Zettel (ccztux), all rights reserved, Version: 2.2.9
[1607079032] modpd: Copyright © 2017-2020 Christian Zettel (ccztux), all rights reserved, Version: 2.2.10
[1607079032] modpd: Starting...
[1607079032] Event broker module '/usr/local/nagios/include/modpd.o' initialized successfully.
[1607079332] modpd: The modpd NEB module is running 0d 0h 5m 0s
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.9
2.2.10
4 changes: 2 additions & 2 deletions etc/init.d/modpd
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
# Project website: https://github.com/ccztux/modpd
#
# Last Modification: Christian Zettel (ccztux)
# 2020-12-09
# 2020-12-10
#
# Version 2.2.9
# Version 2.2.10
#
# Description: init script for modpd (Monitoring Obsessing Data Processor Daemon)
#
Expand Down
17 changes: 9 additions & 8 deletions etc/logrotate.d/modpd
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
# Project website: https://github.com/ccztux/modpd
#
# Last Modification: Christian Zettel (ccztux)
# 2020-12-09
# 2020-12-10
#
# Version 2.2.9
# Version 2.2.10
#
# Description: logrotate config file for modpd (Monitoring Obsessing Data Processor Daemon)
#
Expand All @@ -36,10 +36,11 @@

/usr/local/modpd/var/log/modpd.log
{
weekly
rotate 6
missingok
notifempty
sharedscripts
compress
su nagios nagios
weekly
rotate 6
missingok
notifempty
sharedscripts
compress
}
4 changes: 2 additions & 2 deletions etc/sysconfig/modpd
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
# Project website: https://github.com/ccztux/modpd
#
# Last Modification: Christian Zettel (ccztux)
# 2020-12-09
# 2020-12-10
#
# Version 2.2.9
# Version 2.2.10
#
# Description: Config parameters for the init script of the modpd daemon
# (Monitoring Obsessing Data Processor Daemon)
Expand Down
4 changes: 2 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
# Project website: https://github.com/ccztux/modpd
#
# Last Modification: Christian Zettel (ccztux)
# 2020-12-09
# 2020-12-10
#
# Version 2.2.9
# Version 2.2.10
#
# Description: Makefile for the modpd NEB module
#
Expand Down
8 changes: 4 additions & 4 deletions src/modpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
* Project website: https://github.com/ccztux/modpd
*
* Last Modification: Christian Zettel (ccztux)
* 2020-12-09
* 2020-12-10
*
* Version 2.2.9
* Version 2.2.10
*
* Description: NEB module to write obsessing data to unix socket
* Based on example: nagioscore/module/helloworld.c
Expand Down Expand Up @@ -83,12 +83,12 @@ int nebmodule_init(int flags, char *args, nebmodule *handle)
neb_set_module_info(modpd_module_handle, NEBMODULE_MODINFO_TITLE, "modpd");
neb_set_module_info(modpd_module_handle, NEBMODULE_MODINFO_AUTHOR, "Christian Zettel (ccztux)");
neb_set_module_info(modpd_module_handle, NEBMODULE_MODINFO_TITLE, "Copyright © 2017-2020 Christian Zettel (ccztux), all rights reserved");
neb_set_module_info(modpd_module_handle, NEBMODULE_MODINFO_VERSION, "2.2.9");
neb_set_module_info(modpd_module_handle, NEBMODULE_MODINFO_VERSION, "2.2.10");
neb_set_module_info(modpd_module_handle, NEBMODULE_MODINFO_LICENSE, "GPL v2");
neb_set_module_info(modpd_module_handle, NEBMODULE_MODINFO_DESC, "Obsessing NEB Module.");

/* log module info to the Nagios log file */
write_to_all_logs("modpd: Copyright © 2017-2020 Christian Zettel (ccztux), all rights reserved, Version: 2.2.9", NSLOG_INFO_MESSAGE);
write_to_all_logs("modpd: Copyright © 2017-2020 Christian Zettel (ccztux), all rights reserved, Version: 2.2.10", NSLOG_INFO_MESSAGE);

/* log a message to the Nagios log file */
snprintf(temp_buffer, sizeof(temp_buffer) - 1, "modpd: Starting...\n");
Expand Down
8 changes: 4 additions & 4 deletions usr/local/modpd/bin/modpd
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
# Project website: https://github.com/ccztux/modpd
#
# Last Modification: Christian Zettel (ccztux)
# 2020-12-09
# 2020-12-10
#
# Version 2.2.9
# Version 2.2.10
#
# Description: modpd (Monitoring Obsessing Data Processor Daemon)
#
Expand Down Expand Up @@ -1546,11 +1546,11 @@ _main()
g_pid="${$}"
g_argc="${#}"
g_name="${0##*/}"
g_version="2.2.9"
g_version="2.2.10"
g_author="Christian Zettel (ccztux)"
g_copyright="Copyright © 2017-2020 ${g_author}, all rights reserved"
g_project_website="https://github.com/ccztux/${g_name}"
g_last_modification_date="2020-12-09"
g_last_modification_date="2020-12-10"
g_minimal_required_bash_version="3"
g_license="GNU GPLv2"
g_description="${g_name} (Monitoring Obsessing Data Processor Daemon)"
Expand Down
4 changes: 2 additions & 2 deletions usr/local/modpd/etc/modpd.sample.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
# Project website: https://github.com/ccztux/modpd
#
# Last Modification: Christian Zettel (ccztux)
# 2020-12-09
# 2020-12-10
#
# Version 2.2.9
# Version 2.2.10
#
# Description: Config file for modpd (Monitoring Obsessing Data Processor Daemon)
#
Expand Down

0 comments on commit 6d75974

Please sign in to comment.