Giter VIP home page Giter VIP logo

cfengine-tad's Introduction

Description

An IRC bot that provides information about an autonomous CFEngine node.

The word tad means world in sanskrit.

Features:

  • Reads reports created by the vacana lib report bundles
    • Host info report
    • Classes
    • Promises
  • Search classes and promises
  • Watch report file for changes and get notified about it
  • Notify about repaired and failed promises at a given interval

Installation

Binary

TODO

Source

git clone https://github.com/smotti/cfengine-tad.git
cd cfengine-tad
make

The above will compile the bot and build a binary named tad, which you then can drop where you like.

Usage

Usage of ./tad:
  -chan="#tad": Channels to join
  -classes="./data/classes.log": Path to classes report
  -config="": Path to ini config for using in go flags. May be relative to the current executable path.
  -configUpdateInterval=0: Update interval for re-reading config file set via -config flag. Zero disables config file re-reading.
  -dumpflags=false: Dumps values for all flags defined in the app into stdout in ini-compatible syntax and terminates the app.
  -hostInfo="./data/va_host_info_report.json": Path to host info report
  -listenChannel=false: Listen for command on public channels
  -name="tad": Nick to use in IRC
  -notifyFailed=true: Notify about failed promises
  -notifyInterval=5m0s: Interval on when to notify about repaired and/or failed promises
  -notifyRepaired=true: Notify about repaired promises
  -promises="./data/promises_outcome.log": Path to promises report
  -server="127.0.0.1:6668": Host:Port to connect to
  -ssl=false: Use SSL/TLS
  -watchInterval=1s: Interval when to check files in watch dir (in seconds)

All flags can also be specified within an ini-file and provided to the bot via the -config flag. NOTE: That by default the bot only responds to commands send via private query.

Commands

  • !os
    • Display the following data about the hosts OS: arch, flavor, os, release, uptime, version
  • !cfe
    • Display data about the hosts CFEngine installation: bootstrappedTo, lastAgentRun, policyLastUpdate, policyReleaseId
  • !id
    • Display data about the host's identity: fqdn (fully quallified domain name), id (md5 calculated by cfengine), uqdn (unique quallified domain name)
  • !net if
    • Display the host's network interface with: ipv4 (address), flags, mac, name
  • !net ports
    • Display a list of listening ports: inet (ipv4 or ipv6), port, protocol
    • Note currently only tcp ports are listed because cfengine seems to have problems with fetching a list of udp ports
  • !sw
    • Display a list of all installed packages: arch, method, name, version
    • NOTE: This list can be quite large
  • !sw
    • Search for software packages by name that match the pattern
  • !cl
    • Display a list of classes defined during the last run
  • !cl
    • Search for classes that match the pattern
  • !p
    • Display a list of promises: class, handler, promiser, promisee, outcome
  • !p
    • Search promises for pattern, it will search all fields for the pattern

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.