bisohns / saido Goto Github PK
View Code? Open in Web Editor NEWYAML based tool for monitoring metrics across multiple hosts
License: Apache License 2.0
YAML based tool for monitoring metrics across multiple hosts
License: Apache License 2.0
Currently, only using a keyfile is allowed by saido for ssh. We also have to make config provision for when the ssh is made via a pasword only and no keyfile
CLI package for processing subcommands and arguments. Cobra can be used in this case
We should be able to do things like
yaad run
, yaad run -f remote.yml
Drivers fulfill the driver interface and define consistent ways to be able to connect to instances and execute commands to obtain metrics.
Some rudimentary Driver suggestions are
Remote windows 8 below do not have ssh capabilities. This would cover the ability to be able to specify winrm support for logging in
Create utility or package for parsing yaml files and getting the appropriate arguments to retrieve host metrics
{
"Error":false,
"Message":{
"Host":"localhost",
"Name":"docker",
"Platform":"Linux",
"Data":[
{
"CPU":11.29,
"ContainerID":"0a993a28a444",
"ContainerName":"saido-linux-sshserver",
"Limit":15749.12,
"MemPercent":0.08,
"MemUsage":12.32,
"Pid":30
}
]
}
}
{
"Error":false,
"Message":{
"Host":"localhost",
"Name":"memory",
"Platform":"Linux",
"Data":{
"Cached":3595.96484375,
"MemFree":8833.71875,
"MemTotal":15745.2421875,
"SwapFree":2047.99609375,
"SwapTotal":2047.99609375
}
}
}
{
"Error":false,
"Message":{
"Host":"localhost",
"Name":"disk",
"Platform":"Linux",
"Data":[
{
"Available":0,
"FileSystem":"sysfs",
"PercentFull":0,
"Size":0,
"Used":0,
"VolumeName":""
},
{
"Available":0,
"FileSystem":"proc",
"PercentFull":0,
"Size":0,
"Used":0,
"VolumeName":""
},
{
"Available":7835.03515625,
"FileSystem":"udev",
"PercentFull":0,
"Size":7835.03515625,
"Used":0,
"VolumeName":""
},
{
"Available":0,
"FileSystem":"devpts",
"PercentFull":0,
"Size":0,
"Used":0,
"VolumeName":""
},
{
"Available":1572.25390625,
"FileSystem":"tmpfs",
"PercentFull":1,
"Size":1574.52734375,
"Used":2.2734375,
"VolumeName":""
},
{
"Available":44444.79296875,
"FileSystem":"/dev/nvme0n1p7",
"PercentFull":76,
"Size":187399.83984375,
"Used":133364.5,
"VolumeName":""
},
{
"Available":0,
"FileSystem":"securityfs",
"PercentFull":0,
"Size":0,
"Used":0,
"VolumeName":""
},
{
"Available":7813.92578125,
"FileSystem":"tmpfs",
"PercentFull":1,
"Size":7872.62109375,
"Used":58.6953125,
"VolumeName":""
},
{
"Available":4.99609375,
"FileSystem":"tmpfs",
"PercentFull":1,
"Size":5,
"Used":0.00390625,
"VolumeName":""
},
{
"Available":7872.62109375,
"FileSystem":"tmpfs",
"PercentFull":0,
"Size":7872.62109375,
"Used":0,
"VolumeName":""
}
]
}
}
{
"Error":false,
"Message":{
"Host":"localhost",
"Name":"tcp",
"Platform":"Linux",
"Data":{
"Ports":{
"2222":"ESTAB",
"33518":"CLOSE-WAIT",
"52370":"CLOSE-WAIT",
"53556":"ESTAB",
"55832":"ESTAB",
"56661":"FIN-WAIT-2",
"57848":"CLOSE-WAIT",
}
}
}
}
{
"Error":false,
"Message":{
"Host":"0.0.0.0",
"Name":"custom",
"Platform":"Linux",
"Data":{
"Output":"Hello!!!\n"
}
}
}
{
"Error":false,
"Message":{
"Host":"localhost",
"Name":"loadavg",
"Platform":"Linux",
"Data":{
"Load15M":0.77,
"Load1M":0.94,
"Load5M":1
}
}
}
{
"Error":false,
"Message":{
"Host":"localhost",
"Name":"process",
"Platform":"Linux",
"Data":[
{
"CPU":0,
"Command":"/sbin/init splash",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":1,
"User":"root"
},
{
"CPU":0,
"Command":"[kthreadd]",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"root"
},
{
"CPU":0,
"Command":"[irq/124-pciehp]",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"root"
},
{
"CPU":0,
"Command":"[acpi_thermal_pm]",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"root"
},
{
"CPU":0,
"Command":"[vfio-irqfd-clea]",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"root"
},
{
"CPU":0,
"Command":"[kworker/5:1H-events_highpri]",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"root"
},
{
"CPU":0,
"Command":"[kworker/4:1H-kblockd]",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"root"
},
{
"CPU":0,
"Command":"[mld]",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"root"
},
{
"CPU":0,
"Command":"[ipv6_addrconf]",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"root"
},
{
"CPU":0,
"Command":"[kstrp]",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"root"
},
{
"CPU":0,
"Command":"[zswap-shrink]",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"root"
},
{
"CPU":0,
"Command":"[charger_manager]",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"root"
},
{
"CPU":0,
"Command":"[kworker/2:1H-kblockd]",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"root"
},
{
"CPU":0,
"Command":"[kworker/6:1H-events_highpri]",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"root"
},
{
"CPU":0,
"Command":"/usr/lib/policykit-1/polkitd --no-debug",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":1,
"User":"root"
},
{
"CPU":0,
"Command":"/usr/sbin/rsyslogd -n -iNONE",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"syslog"
},
{
"CPU":0,
"Command":"/usr/lib/snapd/snapd",
"Memory":0.2,
"Pid":0,
"TTY":"?",
"Time":4,
"User":"root"
},
{
"CPU":0,
"Command":"/usr/libexec/switcheroo-control",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"root"
},
{
"CPU":0,
"Command":"/lib/systemd/systemd-logind",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"root"
},
{
"CPU":0,
"Command":"/usr/sbin/thermald --systemd --dbus-enable --adaptive",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":42,
"User":"root"
},
{
"CPU":0,
"Command":"/usr/lib/udisks2/udisksd",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"root"
},
{
"CPU":0,
"Command":"/sbin/wpa_supplicant -u -s -O /run/wpa_supplicant",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"root"
},
{
"CPU":0,
"Command":"avahi-daemon: chroot helper",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"avahi"
},
{
"CPU":0,
"Command":"/usr/sbin/ModemManager",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"root"
},
{
"CPU":0,
"Command":"/usr/libexec/boltd",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"root"
},
{
"CPU":0,
"Command":"/usr/bin/containerd",
"Memory":0.3,
"Pid":0,
"TTY":"?",
"Time":77,
"User":"root"
},
{
"CPU":0,
"Command":"/usr/bin/redis-server 127.0.0.1:6379",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":36,
"User":"redis"
},
{
"CPU":0,
"Command":"/usr/lib/postgresql/12/bin/postgres -D /var/lib/postgresql/12/main -c config_file=/etc/postgresql/12/main/postgresql.conf",
"Memory":0.1,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"postgres"
},
{
"CPU":0,
"Command":"postgres: 12/main: checkpointer",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"postgres"
},
{
"CPU":0,
"Command":"postgres: 12/main: background writer",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"postgres"
},
{
"CPU":0,
"Command":"postgres: 12/main: walwriter",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"postgres"
},
{
"CPU":0,
"Command":"postgres: 12/main: autovacuum launcher",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"postgres"
},
{
"CPU":0,
"Command":"postgres: 12/main: stats collector",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"postgres"
},
{
"CPU":0,
"Command":"postgres: 12/main: logical replication launcher",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"postgres"
},
{
"CPU":0,
"Command":"/usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal",
"Memory":0.1,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"root"
},
{
"CPU":0,
"Command":"/usr/lib/upower/upowerd",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":1,
"User":"root"
},
{
"CPU":0,
"Command":"/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock",
"Memory":0.5,
"Pid":0,
"TTY":"?",
"Time":6,
"User":"root"
},
{
"CPU":0,
"Command":"/usr/bin/whoopsie -f",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"whoopsie"
},
{
"CPU":0,
"Command":"/usr/sbin/kerneloops --test",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"kernoops"
},
{
"CPU":0,
"Command":"/usr/sbin/kerneloops",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"kernoops"
},
{
"CPU":0,
"Command":"bpfilter_umh",
"Memory":0,
"Pid":0,
"TTY":"?",
"Time":0,
"User":"root"
}
]
}
}
{
"Error":false,
"Message":{
"Host":"0.0.0.0",
"Name":"uptime",
"Platform":"Linux",
"Data":{
"Idle":164374.76,
"IdlePercent":0,
"Up":566391.23
}
}
}
Several types of charts that can be used to appropriately display metrics provided by inspectors. These should be implemented using termdash
Some simple
Currently the metrics are defined globally and all hosts attempt to run them, however we would like to be able to extend commands for a single host by doing something like
hosts:
children:
"0.0.0.0":
metrics:
docker:
connection:
type: ssh
username: ci-dev
port: 2222
private_key_path: "/home/diretnan/Projects/Personal/saido/ssh-key/ci/ci-test-key"
"localhost":
connection:
type: local
metrics:
custom: "cat /proc/uptime"
loadavg:
poll-interval: 10
Docker metric (along with custom and loadavg) would only run for 0.0.0.0
while Custom and Loadavg would be run for the rest i.e localhost
Inspectors are responsible for retrieving specific statistics from a driver via the use of a particular command
Some rudimentary inspectors to implement are
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.