This file contains 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
auth_enabled: false | |
server: | |
http_listen_port: 3100 | |
grpc_listen_port: 9096 | |
common: | |
instance_addr: 127.0.0.1 | |
path_prefix: /data/loki | |
storage: |
This file contains 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
server: | |
http_listen_port: 9080 | |
grpc_listen_port: 0 | |
positions: | |
filename: /tmp/positions.yaml | |
clients: | |
- url: http://Loki-Server:3100/loki/api/v1/push #Connect to Loki Server |
This file contains 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
find /path/to/log -name ‘*.log’ -mtime -30 days | awk ‘{print “rm -r “$0}’ > "/path/to/output_file_$(date +%F)" |
This file contains 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
# This file must be used with "source bin/activate" *from bash* | |
# you cannot run it directly | |
deactivate () { | |
# reset old environment variables | |
if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then | |
PATH="${_OLD_VIRTUAL_PATH:-}" | |
export PATH | |
unset _OLD_VIRTUAL_PATH | |
fi |
This file contains 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
version: "3.9" | |
services: | |
jupyter: | |
image: jupyter/scipy-notebook | |
ports: | |
- "8888:8888" | |
# volumes: | |
# - ./notebooks:/home/jovyan/ | |
environment: |
This file contains 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
status="$(systemctl is-active Services_Name])" | |
if [ "$status" = "active" ]; then | |
echo "Services_Name 1" | curl --data-binary @- http://localhost:9091/metrics/job/Pushgateway/instance/compute-01 | |
else | |
echo "Service_Name 0" | curl --data-binary @- http://localhost:9091/metrics/job/Pushgateway/instance/compute-01 | |
exit 1 | |
fi |
This file contains 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 -e | |
# Port scanner with Bash | |
# Author: Ridwan_G4 | |
# Bash Color | |
GREEN='\033[0;32m' | |
RED='\033[0;31m' | |
YELLOW='\e[1;33m' | |
WHITE='\e[1;37m' | |
PURPLE='\e[0;35m' |
This file contains 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 | |
# ping | |
echo " " | |
echo Mengirim Ping ! | |
echo "Tanggal : $(date)" | |
echo " " | |
cat node.txt | while read output | |
do | |
ping -c 1 $"output" > /dev/null | |
if [ $? -eq 0 ]; then |
This file contains 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 | |
HOSTS="host1 host2 host3 host4" | |
RETENTION_TIME=14 | |
echo "$(date) - Log Cleaner - $RETENTION_TIME days - $HOSTS" >> /var/log/hadoop_log_cleaner.log | |
for host in $HOSTS | |
do | |
ssh root@$host << ENDSSH |
NewerOlder