I hereby claim:
- I am garimadamani on github.
- I am garimadamani (https://keybase.io/garimadamani) on keybase.
- I have a public key ASB_o_F0qgFmVFCYSZWODnDj9DjwidFiCBmU_wWZs29ikQo
To claim this, I am signing this object:
CREATE DATABASE s3_access_logs_db; | |
CREATE EXTERNAL TABLE `s3_access_logs_db.mybucket_logs`( | |
`bucketowner` STRING, | |
`bucket_name` STRING, | |
`requestdatetime` STRING, | |
`remoteip` STRING, | |
`requester` STRING, | |
`requestid` STRING, | |
`operation` STRING, |
#!/bin/bash | |
cat <<EOF | sudo tee /etc/apt/sources.list.d/influxdata.list | |
deb https://repos.influxdata.com/ubuntu bionic stable | |
EOF | |
sudo curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get -y install telegraf | |
sudo systemctl enable --now telegraf | |
sudo systemctl is-enabled telegraf | |
systemctl status telegraf |
import hudson.model.Job | |
import jenkins.model.Jenkins | |
import hudson.tasks.LogRotator | |
import jenkins.model.BuildDiscarderProperty | |
name = "test_master_builder_medium_blog" | |
job_daystokeep = -1 | |
job_numtokeep = 20 | |
artifact_numtokeep = 20 | |
artifact_daystokeep = -1 |
#!/bin/bash | |
echo "Adding user $1 with sudo access" | |
adduser --disabled-password --gecos "" $1 | |
cd /home/$1/ | |
mkdir .ssh | |
cd /home/$1/.ssh/ | |
touch authorized_keys | |
echo $2 >> authorized_keys | |
cd /home/$1/ |
I hereby claim:
To claim this, I am signing this object:
# Installing Supervisord | |
apt-get update && apt-get install -y python-setuptools | |
easy_install supervisor | |
mkdir /etc/supervisor | |
echo_supervisord_conf > /etc/supervisor/supervisord.conf | |
mkdir /etc/supervisor/conf.d |
[program:parse_logs] | |
command=bash /var/opt/scripts/parse_logs.sh | |
autostart=true | |
autorestart=false | |
startretries=1 | |
stderr_logfile=/var/log/parse_logs.err.log | |
stdout_logfile_maxbytes=0 | |
stderr_logfile_maxbytes=0 | |
user=root |
import socket | |
import time | |
from prometheus_client import Enum, start_http_server, Gauge | |
start_http_server(9091) | |
def artifactory_status(art_states): | |
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
sock.settimeout(2) |
#!/bin/bash/ | |
FILE_PATH=”/var/opt/scripts/past_1min.log” | |
FETCH_LOG=”/var/opt/jfrog/artifactory/logs/request.log” | |
while true | |
do | |
TIME=$(date — date “-1min” ‘+%Y%m%d%H%M’) | |
sed -n “/^$TIME/,$ p” $FETCH_LOG > $FILE_PATH | |
echo -n “$(grep ‘HTTP/1.1|20.|’ $FILE_PATH | wc -l)” > /var/opt/scripts/parse.out.log |
#!/bin/bash/ | |
FILE_PATH=”/var/opt/scripts/past_1min.log” | |
FETCH_LOG=”/var/opt/jfrog/artifactory/logs/request.log” | |
while true | |
do | |
TIME=$(date — date “-1min” ‘+%Y%m%d%H%M’) | |
sed -n “/^$TIME/,$ p” $FETCH_LOG > $FILE_PATH | |
echo -n “$(grep ‘HTTP/1.1|20.|’ $FILE_PATH | wc -l)” > /var/opt/scripts/parse.out.log |