kill -3 $id
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Check if the correct number of arguments is passed | |
if [ "$#" -ne 4 ]; then | |
echo "Usage: $0 APP_PACKAGE DEVICE_HOST DEVICE_PORT LOG_DIR" | |
exit 1 | |
fi | |
# Assign command-line arguments to variables | |
APP_PACKAGE="$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Find log4j jars | |
sudo find / -type f -name "*log4j-core*jar" | |
# Find extracted log4j | |
sudo find / -type d -wholename "*/org/apache/logging/log4j/core" | |
# Find log4j included in jars & wars | |
sudo find / -type f \( -name "*.jar" -or -name "*.war" \) -exec sh -c "if zipinfo {} | grep JndiLookup.class; then echo -e '{}\n'; fi" \; | |
# TODO: ears can include jars and wars |
This snippet will dynamically set the thresholds for check_load exported resources in Icinga/Nagios via Puppet exported resources based on the processorcount fact.
@@nagios_service { "LX_LOAD_${hostname}":
check_command => "ssh_load!${$::processorcount*2}!${$::processorcount}!${$::processorcount*0.7}!${$::processorcount*4}!${$::processorcount*2}!${$::processorcount}",
use => "generic-service",
host_name => "$fqdn",