system-metrics-collector
v1.0.8
Published
Send Linux system metrics from any linux machine to Aws S3
Downloads
11
Keywords
Readme
system-metrics-collector
system-metrics-collector
What is System Metrics Collector?
System Metrics Collector is a tool that allows you to collect system information and upload them on a S3 bucket. System Metrics Collector is only compatible with Linux. We recommend you to use metrics2xlsx to visualize these data.
How to use it
This tool is available both for Go and NodeJs.
1. Go
You need to install Go first. Please follow this instructions. Then you can write this command to build this tool:
go get
go build -o build/smc main.go
2. Node
npm install -g system-metrics-collector
Configuration
Before starting using this tool you have to create a configuration file called .smc in your Home folder. This file is structured like this
{
"id": "customer-pc-1",
"customerId": "customer name",
"bucket": "bucket name",
"cloudWatchEnabledStats": ["MemoryUtilization","CpuUtilization"],
"aws": {
"accessKeyId": "",
"secretAccessKey": "",
"region": ""
}
}
If you are using go you can generate the default config running
./smc generateConfig [fullpath]
The full path also includes the file name. Example: /home/ec2-user/.smcrc
Flags
Otherwise you can run this tool with several flags (flags overcome config values)
--bucket
Sets s3 bucket name.--id
Sets an unique id which identify your device.--customerId
Sets the customer id. It will be used to identify your customers.--configPath
Sets the config path (It includes file name).--lastDataPath
Sets last data Path (It includes file name).
How to run it
1. Go
Go builds the executable file named 'smc' into 'build' directory.
2. Node
You can simply run it by writing:
smc