systats: Go Module to Collect Linux System Metrics

systats is written as a part of my ongoing project to create a system monitoring and alerting system, SyMon. Initially, metrics collection was done as a part of SyMon codebase, but to make the maintainability and compatibility simple, it was taken out as a separate module, systats. Currently tested on Ubuntu and CentOS. Repo: https://github.com/dhamith93/systats Supported system metrics: Operating system Distro Hostname Kernel Current logged in users Uptime Last boot date/time Timezone CPU Model Frequency Load average Overall Per core No.

Maintaining Multiple Terraform Versions

While for most cases the latest version is enough, depending on the requirements, and providers, sometimes we have to keep a specific older version of Terraform binary handy to manage our infrastructure. Here are some ways users can maintain multiple versions easily on their desktops locally or on servers using third-party tools or manually. Third-party tools Terraform Switcher (tfswitch) and tfenv both similar tools that lets users pick and use a specific Terraform version they or their code requires.

Generating Ansible Inventory Files From Terraform

First a template of the inventory file should be created depending on the infrastructure design with all the dynamic values set as tokens. For example, here is an inventory file template which handles multiple EC2 instances created in AWS. Server IP and private key file path is added as tokens and it will be filled once the terraform finish creating the infrastructure in AWS or any other providers. For this example AWS is used.