apt install openjdk-8-jdk nodejs=8.12 python-setuptools rpm g++ git python-dev maven=3.3.9
wget http://www.apache.org/dist/ambari/ambari-2.7.1/apache-ambari-2.7.1-src.tar.gz
docker images | awk '(NR>1) && ($2!~/none/) {print $1":"$2}' | xargs -L1 docker pull |
#! /usr/bin/env bash | |
set -o errexit | |
_docker="$(which docker)" | |
rm_docker_exited_containers() | |
{ | |
printf "Removing exited docker containers...\n" | |
_docker_exited=($($_docker ps -a -f status=exited -q)) |
stdbuf -o0 -e0 varnishlog -O -I 'Still sick|Back healthy|Went sick' | awk -v date="$(date +"%Y-%m-%d %r")" '{ print date, $0; fflush() }' |
df --output=source,target | awk 'NR>1 {if ($1 ~ /^\/dev/) print $2}' |
#include <stdio.h> | |
int maxline=80; | |
int main(int argc, char* argv[]) | |
{ | |
char line[2048]; | |
if( (argc>1) && (atoi(argv[1])>0) ) maxline=atoi(argv[1]); | |
while(fgets(line,sizeof(line),stdin)) { | |
line[maxline]='\0'; printf("%s\n",line); | |
} | |
} |
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# | |
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | |
ANSIBLE_METADATA = {'metadata_version': '1.0', | |
'status': ['preview'], | |
'supported_by': 'community'} | |
DOCUMENTATION = ''' |
--- | |
- name: 'Generate temporary PKCS12 keystore' | |
openssl_pkcs12: | |
action: export | |
path: '/tmp/ansible.p12' | |
friendly_name: 'raclette' | |
privatekey_path: '/tmp/key.pem' | |
cert_path: '/tmp/cert.pem' | |
ca_certificates: '/tmp/ca.cer' | |
state: present |
sed -i '1s#^#fileauth sufficient pam_tid.so'# /etc/pam.d/sudo |
Issue: Check_file_age fails to stat file located to /var/tmp/ or /tmp | |
OS: debian 9 | |
init system: systemd | |
nagios plugin: check_file_age | |
Problem: Icinga returns `FILE_AGE CRITICAL: File not found - /var/tmp/foo.bar` | |
while command runs from bash returns: `FILE_AGE OK: /var/tmp/foo.bar is 12905 seconds old and 0 bytes | age=12905s;46800;50400 size=0B;0;0;0` |