運用管理の現場においては、管理コストを抑えつつ、以下にして効率よくサーバを管理できるかが重要。
- システム内で動作しているサーバ、アプリケーション、ネットワークなどが正常に稼働しているかを 定期的に確認することで、システムで発生した障害やリソース不足を検知してシステム管理者に通知を 行うための作業や仕組みのこと。
- システム監視は大きく分けて以下の3つ。
package main | |
import "fmt" | |
// https://github.com/golang/go/wiki/InterfaceSlice | |
func main() { | |
stringSlice := []string{"Tokyo", "Saitama"} | |
// var i interface {} = stringSlice // OK | |
// var is []interface{} = stringSlice // NG |
// https://github.com/nathany/get-programming-with-go/blob/master/lesson24/starship/starship.go | |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"os" | |
) |
package main | |
import ( | |
"fmt" | |
"gopkg.in/go-playground/validator.v9" | |
"reflect" | |
"strings" | |
) | |
type User struct { |
#!/bin/bash | |
# シェルスクリプトで一時的なファイル(中間ファイル)を作成 | |
tmp=/tmp/$$ | |
echo hoge > $tmp-hoge | |
rm $tmp-* | |
# あるファイルがなければシェルスクリプトを終了する | |
[ -f "/etc/passwd" ] || exit 1 |
" Settings | |
set noautofocus | |
set cncpcompletion | |
set nosmoothscroll | |
set nohud | |
set autohidecursor | |
set typelinkhints | |
let locale = "jp" | |
let scrollduration = 10 |
require 'anemone' | |
urls = [ | |
"http://example.com/", | |
"http://example2.com/", | |
] | |
cookies = { | |
} |
#!/usr/bin/env bash | |
set -u | |
# -------------------- | |
# Todo: Install xcode from App Store | |
# -------------------- | |
# for System |
#!/usr/bin/perl | |
# With some other Unix Os, first line may be | |
#!/usr/local/bin/perl | |
# With Apache for Windows and ActiverPerl, first line may be | |
#!C:/Program Files/ActiveState/bin/perl | |
#-Description------------------------------------------- | |
# Merge several log files into one and replace all IP addresses | |
# with resolved DNS host name. | |
# This tool is part of AWStats log analyzer but can be use | |
# alone for any other log analyzer. |