The Spectrum Agent is a piece of software that runs on your hosts. Its job is to collect metrics from your servers (such as CPU, Memory, Network, and more) and store them in Spectrum so that you can use them for monitoring, alerting and analytics purposes.
Pre-requirements
- The Agent can run on Linux based servers
- Python must be installed
Psutil
– Can be installed using:
sudo yum install gcc python-devel python-pip pip install psutil
Download and Install the agent
sudo pip install spotinst-agent
Expected Results:
Initializing the Agent
sudo spotinst-agent init <Token> <AccountID>
Get your
Account Id
from Spotinst Console (under Settings -> Account)Expected Results:
Add System Collector
Add system collector to report system metrics to Spectrum from your hosts.
sudo spotinst-agent add-collector system
Expected Results:
Heap data:
current_eden_space_capacity
current_eden_space_utilization
current_old_space_capacity
current_old_space_utilization
metaspace_capacity
metaspace_utilization
number_of_young_generation_garbage_collection_events
young_generation_garbage_collection_time
number_of_full_garbage_collection_events
Class data:
loaded_classes
unloaded_classes
Thread data:
thread_state
Agent Status
Use this command to validate that the agent is running properly.
sudo service --status-all | grep spotinst-agent
Expected Results: