Skip to content

Instantly share code, notes, and snippets.

View Stakecraft's full-sized avatar

StakeCraft Stakecraft

View GitHub Profile

Keybase proof

I hereby claim:

  • I am stakecraft on github.
  • I am stakecraft (https://keybase.io/stakecraft) on keybase.
  • I have a public key ASDnpYcoFHj4V682SYWeK6bIswzEyyltlPq_lcv6lSbJ8Ao

To claim this, I am signing this object:

@Stakecraft
Stakecraft / klaytn_block_watcher.sh
Created June 23, 2022 08:59
Klaytn Fullnode Block Watcher
#!/bin/bash
### IMPORTANT NOTES ###
### curl and jq needs to be installed in advance ###
### variables section ###
remote_endpont="https://public-node-api.klaytnapi.com/v1/cypress"
local_endpoint="http://127.0.0.1:31271"
telegram_chat_id="chat-id"
telegram_bot="bot-id"
Feb 3 00:39:14 testnet-04 okp4d[200400]: #033[90m12:39AM#033[0m #033[32mINF#033[0m service start #033[36mimpl=#033[0m"Peer{MConn{185.255.131.17:26656} 26114bc5cb42ef90be2aba5b4b6d82bab7a60c31 out}" #033[36mmodule=#033[0mp2p #033[36mmsg=#033[0m{} #033[36mpeer=#033[0m{"id":"26114bc5cb42ef90be2aba5b4b6d82bab7a60c31","ip":"185.255.131.17","port":26656}
Feb 3 00:39:14 testnet-04 okp4d[200400]: #033[90m12:39AM#033[0m #033[32mINF#033[0m service start #033[36mimpl=#033[0mMConn{185.255.131.17:26656} #033[36mmodule=#033[0mp2p #033[36mmsg=#033[0m{} #033[36mpeer=#033[0m{"id":"26114bc5cb42ef90be2aba5b4b6d82bab7a60c31","ip":"185.255.131.17","port":26656}
Feb 3 00:39:14 testnet-04 okp4d[200400]: #033[90m12:39AM#033[0m #033[32mINF#033[0m Added peer #033[36mmodule=#033[0mp2p #033[36mpeer=#033[0m{"Data":{},"Logger":{}}
Feb 3 00:39:14 testnet-04 okp4d[200400]: #033[90m12:39AM#033[0m #033[32mINF#033[0m service start #033[36mimpl=#033[0m"Peer{MConn{38.242.150.63:36656} a7f1dcf7441761b0e0e1f8c6fdc79d3904c22c01 out}" #033[36mmo
@Stakecraft
Stakecraft / new-server-setup-ubuntu-22.yaml
Last active November 18, 2023 21:01
ansible-playbook -i new-server.ini new-server-setup-ubuntu-22.yaml
---
- hosts: all
become: yes
vars:
ansible_ssh_user: '{{ default_ssh_user }}'
ansible_ssh_port: '{{ default_ssh_port }}'
sudo_user:
# password must be generated through "mkpasswd" command from 'whois' package
- login: '{{ ansible_user }}'
group: '{{ ansible_user }}'
@Stakecraft
Stakecraft / new-server.ini
Last active November 24, 2023 20:16
run: ansible-playbook -i new-server.ini new-server-setup-ubuntu-22.yaml, node_exporter.service.j2 should be placed in templates directory
[servers]
YOUR-IP
[all:vars]
ansible_ssh_common_args='-o StrictHostKeyChecking=no'
ansible_python_interpreter='/usr/bin/python3'
prometheus_source_ip='PROMETHEUS-IP'
systemd_path='/etc/systemd/system'
default_ssh_user='ubuntu'
default_ssh_port='22'