Giter VIP home page Giter VIP logo

puppet-summary's Introduction

Puppet Summary

This is an application that helps you sort through the Puppet reports that are generated by your Puppet infrastructure. The summary will give you a quick overview of the state of your infrastructure and will help you identify any issues that may have occurred. There is an API and web interface that you can use to view the reports. The application will also allow you to upload the raw reports from Puppet to the application, which will then be processed and stored in the database. The application will also allow you to purge the database of old reports. The application is written in GO and uses the gorilla/mux router for the API and the web interface.

Usage

There are multiple ways to run the application. You can either run the application directly on your host or you can run the application within a Docker container. The application will listen on port 8080 by default.

When running the application, the app will default to using the local filesystem to store the raw reports, the default database is SQLite. These can be changed by using the flags that are available (Listed below).

Commands

The application has the following commands:

Serve

The serve command will start the application and listen on port 8080. This is the primary command that you will use to run the application.

You can view the help for this command by running:

./puppet-summary serve --help

Purge

The purge command will purge the database of data older than the specified number of days. This is useful if you want to keep the database size down.

You can view the help for this command by running:

./puppet-summary purge --help

Version

The version command will print the version of the application.

This command does not have any flags and can be run by running:

./puppet-summary version

Setup

MySQL

When using MySQL, you will be required to specify a DB_CONN_STR environment variable with the connection string to your MySQL database. For example:

DB_CONN_STR="root:Password01@tcp(localhost:3306)/puppet-summary?timeout=90s&multiStatements=true&parseTime=true"

MongoDB

When using MongoDB, you will be required to specify a DB_CONN_STR environment variable with the connection URI to your MongoDB database. For example:

DB_CONN_STR="mongodb+srv://user:password@host/?retryWrites=true"

Google Cloud Storage

./puppet-summary -gcs <bucket>

This will allow the /upload endpoint to push the raw reports from Puppet to Google Cloud Storage. For this, you will be required to specify a gcs-bucket flag with the name of the bucket to upload to; you will also need the GCS_CREDENTIALS environment variable with the contents of the JSON credentials file. For example:

GCS_CREDENTIALS=<json-contents>

S3 Storage

Coming soon

Endpoint Authentication

./puppet-summary -auth-token <token>

This will enable the security on the endpoints that use the authentication method AuthOptionRequired. This includes the /upload. If the token is not provided, there will be no security on the endpoints.

puppet-summary's People

Contributors

dependabot[bot] avatar jacobbrewer1 avatar

Stargazers

 avatar

Watchers

 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.