Langsung ke konten utama

Postingan

Menampilkan postingan dari April, 2018

Prometheus - Grafana - Node_Exporter

Buat Docker Prometheus dan Grafana serta VM yang nanti akan dimonitor (data diambil menggunakan node_exporter) ===prometheus.yml=== global:   scrape_interval:     15s    evaluation_interval: 15s    external_labels:     monitor: 'codelab-monitor' scrape_configs:   - job_name: 'prometheus'     scrape_interval:     5s     static_configs:       - targets: ['localhost:9090'] ################# # Node Exporter # #################   - job_name: 'node_exporter_labs'     scrape_interval: 5s     static_configs:       - targets: ['192.168.3.57:9100']         labels:           group: 'node_exporter' *localhost:9090 -> prometheus *192.168.3.57 -> node_exporter

Resize Instance EC2

Pada awalnya saya buat instance t2.micro untuk dipasang jfrog-artifactory, tapi ternyata artifactory sendiri membutuhkan kisaran 800MB dalam mode standby. Kita resize agar bisa berjalan dengan normal lebih-lebih lancar. Klik Instance State > Stop Klik Action > Instance Settings > Change Instance Type Dari t2.micro saya ganti jadi t2.small Klik Instance State > Start

Install Golang, Glide,

Download $ curl -O https://storage.googleapis.com/golang/go1.10.linux-amd64.tar.gz Ekstrak $ sudo tar -C /usr/local/ -xzf go1.10.linux-amd64.tar.gz Setting Path $ sudo nano ~/.profile export PATH=$PATH:/usr/local/go/bin export GOROOT=/usr/local/go export GOPATH=$HOME/go export GOBIN=$GOROOT/bin GOROOT: Location where Go Package installed GOPATH: Location of your work directory GOBIN : Location golang binary Refresh profile $ source ~/.profile If use zshbash, change at ~/.zshrc then resfresh it Check environment $ go env Ekstra =============================================== Install glide $ sudo  curl https://glide.sh/get | sh or $ sudo add-apt-repository ppa:masterminds/glide && sudo apt-get update $ sudo apt-get install glide

Monitoring employees contribute at project

We can install git self-hosted (like Gitlab, Googs etc) so we can login as admin then mask-"login" as employess. But If we use git cloud we can use git log or git shortlog, gitstats, git-fame etc. ================================== GIT LOG ================================== Show commit by author specific date $ git shortlog -sne --since="01 Feb 2018" --before="01 Mar 2018" Example:     77  Bondowoso <me.woso@gmail.com>     13  Jonggrang <jonggrang@gmail.com> ================================== GITSTATS ================================== Install: $ sudo apt update $ sudo apt install gitstats Run: $ gitstats /path/to/project /path/to/result Example: $ gitstats /home/en/sdk-chat-android /home/en/Downloads/android Open index.html at /home/en/Downloads/android/index.html ================================= GIT-FAME ================================= Install: $ pip install --user git-fame $ cd /path/to/project $ git...