This week I mainly worked on setting up monitoring system using prometheus and grafana.
Monitoring and Logging
- Example of how to write a graylog output plugin
- Add graylog2 stored data in grafana:
- Type: elasticsearch
- Connect to the configured elasticsearch instances used in graylog2
- Leave 『Index name』empty
- Time field name: timestamp
- Prometheus client libraries keep all metrics, do not use keep increasing value as a tag, such as user id.
- Rsyslog writes logs to file using user and group syslog
Misc
Recreate Postgres database on macOS installed via Homebew
rm -rf /usr/local/var/postgres && initdb /usr/local/var/postgres -E utf8
Homebrew 镜像,和其它一些软件源镜像 开源镜像使用帮助列表 [LUG@USTC]
Maven 镜像仓库
<mirror> <id>nexus-aliyun</id> <mirrorOf>*</mirrorOf> <name>Nexus aliyun</name> <url>https://maven.aliyun.com/repository/public</url> </mirror>
An example that caches maven dependencies in Gitlab CI:
cache: paths: - .m2/ variables: MAVEN_OPTS: "-Dmaven.repo.local=.m2" maven_job: script: - mvn clean install
Automate game testing using image recognition