osprobe

command module
v0.0.0-...-fb66bc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

README

About
=======

Probe Linux, Windows, and ESXi for CPU and memory utilization, and push the results to a Pushgateway.

Background
-----------

We have a large num. of servers running in our lab, but engineers always compain there are not enough available resources although every one reserves many servers. This application probes servers for CPU and memory utilization based on OS stats and reports the results to a Prometheus Pushgateway for continuous monitoring (after integrating Prometheus and Grafana) - if the CPU and memory utilization on some servers are always low, the servers should be released for people who really need resources.

Prerequisites
--------------

- Allow Pings;
- Allow connections to ports (or just stop firewall):

  * Linux: 22;
  * Windows: 3389 (for OS dection), 5985 (for WinRM HTTP);
  * ESXi: 902 (for OS dection), 443 (for vSphere API).

- Linux: Password based ssh access;
- Windows:

  * A valid local credentail (domain credentials do not work);
  * Enable WinRM with basic auth:

    ::

      winrm quickconfig
      y
      winrm set winrm/config/service/Auth '@{Basic="true"}'
      winrm set winrm/config/service '@{AllowUnencrypted="true"}'
      winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="1024"}'

- ESXi: Configure a valid password for access.

Usage
------

::

  cd scanner
  go build .
  cp hosts.json hosts.test.json
  vim hosts.test.json # Add your server IPs/FQDNs
  cp credentials.json credentials.test.json
  vim credentials.test.json # Define server access credentials
  ./scanner -h
  ./scanner -s hosts.test.json -p credentials.test.json -o servers.test.json
  cd ..
  go build .
  ./osprobe -h
  ./osprobe -c scanner/servers.test.json -g http://<pushgateway>:<port> -i <update interval>

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL