Skip to content

Instantly share code, notes, and snippets.

View rbudiharso's full-sized avatar
🤔
hmmm.... I wonder what's this button here do...

Rahmat Budiharso rbudiharso

🤔
hmmm.... I wonder what's this button here do...
View GitHub Profile
@rbudiharso
rbudiharso / node_exporter_promtail_setup.sh
Created November 28, 2023 08:11
Setup node_exporter and promtail
#!/bin/bash
echo "********PROMTAIL SETUP************"
promtail_file_config="/etc/promtail/promtail.yml"
mkdir -p /etc/promtail
promtail_version_manual="v1.6.1"
LOKI_URL="http://utilities.usetada.dev:3100/loki/api/v1/push"
cat > /etc/systemd/system/promtail.service <<END
[Unit]
Description=Promtail service
@rbudiharso
rbudiharso / debug.log
Created March 19, 2023 04:01
Vagrant up debug
INFO global: Vagrant version: 2.3.4
INFO global: Ruby version: 2.7.6
INFO global: RubyGems version: 3.1.6
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/bin/vagrant"
INFO global: VAGRANT_LOG="debug"
WARN global: resolv replacement has not been enabled!
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.3.4/gems/vagrant-2.3.4/plugins/synced_folders/nfs/plugin.rb

Keybase proof

I hereby claim:

  • I am rbudiharso on github.
  • I am rbudiharso (https://keybase.io/rbudiharso) on keybase.
  • I have a public key whose fingerprint is CFCA 9858 2F54 B3F1 980C C4CF A23F C685 7A9A CEB9

To claim this, I am signing this object:

@rbudiharso
rbudiharso / setup.sh
Created December 26, 2020 11:27
Setup Fedora
#!/bin/bash
set -x
chmod 400 $HOME/.ssh/*
git clone git@github.com:rbudiharso/dotfiles.git .dotfiles
chmod +x $HOME/.dotfiles/setup.sh
$HOME/.dotfiles/setup.sh
@rbudiharso
rbudiharso / setup.sh
Created December 4, 2020 02:43
Fedora setup
#!/bin/sh
set -x
# Manual
# download dotfiles from gdrive and put them in homedir except config
# Automatic
chmod 600 $HOME/.kube/config
chmod -R 400 $HOME/.ssh/*
@rbudiharso
rbudiharso / debug-pod.yaml
Last active December 22, 2020 09:20
Debugging Pod
---
apiVersion: v1
kind: Pod
metadata:
name: debug
spec:
containers:
- name: doks-debug
image: 'rbudiharso/debug-pod:latest'
command:
@rbudiharso
rbudiharso / mongodb_exporter_systemd_setup.sh
Last active March 20, 2024 17:53
mongodb_exporter systemd setup
#!/bin/bash
# create mongodb_exporter.service
cat > /etc/systemd/system/mongodb_exporter.service <<END
[Unit]
Description=mongodb exporter service
After=network.target
[Service]
ExecStart=/usr/local/bin/mongodb_exporter --collect.database --collect.collection --collect.topmetrics --collect.indexusage --mongodb.uri=mongodb+srv://<username>:<password>@<host:port>/?ssl=false
#!/bin/bash
cat > /etc/init.d/node_exporter <<END
#!/bin/sh
### BEGIN INIT INFO
# Provides: node_exporter
# Required-Start: \$local_fs \$network \$named \$time \$syslog
# Required-Stop: \$local_fs \$network \$named \$time \$syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
#!/bin/bash
# create node_exporter.service
cat > /etc/systemd/system/node_exporter.service <<END
[Unit]
Description=node_exporter service
After=network.target
[Service]
ExecStart=/usr/local/bin/node_exporter --collector.systemd
#!/bin/bash
# create node_exporter.service
cat > /etc/systemd/system/node_exporter.service <<END
[Unit]
Description=node_exporter service
After=network.target
[Service]
ExecStart=/usr/local/bin/node_exporter