Code Monkey home page Code Monkey logo

orrdwell's Introduction

oRRDwell

oRRDwell is a monitoring tool, written in bash (except for the config files, in yaml) and on the shoulders of the rrdtool. It aims to be modular and easily customizable by the user.

Also ships with a backend and front end review the data. The backend is a small php server that returns json responses and a front end can consume. The frontend is a React.js app that relays on D3.js to display the data.

This project is under development.

Structure

In the modules folder you can find the source of every module. Every module must load it's configuration and implement the init and the update functions. Also they themselves load their configuration (if needed). The configuration files are to be place in the configs folder. Then, the modules are enabled adding them to the field modules in the main config.

df module example

configs/df.yaml

## global definitions
probes: "/,/boot,/home"
names: "root,boot,home"

modules/df.yaml

function read_df {
  local fs='\'$1'$'
  echo $(echo "$df_reading" | grep -E $fs | awk '{ print $5 }' | sed 's/\%//g')
}

function df_update {
  df_reading=$(df)
  for probe in "${!df_probe[@]}"; do
    update_rrd "$db_folder/df_${df_name[probe]}.rrd" $(read_df "${df_probe[probe]}")
  done
}

function df_init {
  for probe in "${!df_probe[@]}"; do
    dsname="${df_name[probe]}"
    filename="$db_folder/df_$dsname.rrd"
    if [ ! -f "$filename" ]; then
      create_rrd "$filename" "$dsname"
    fi
  done
}


if [ -f "./configs/df.yaml" ]; then
  eval $(parse_yaml "./configs/df.yaml" "df")
fi

if [ "$df_probes" ]; then
  probes=$df_probes
  IFS=',' read -r -a df_probe <<< "$probes"
fi
if [ "$df_names" ]; then
  names=$df_names
  IFS=',' read -r -a df_name <<< "$names"
fi

License

LICENSE

orrdwell's People

Contributors

alejandroherr avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.