Skip to content

RedHatInsights/insights-results-aggregator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Insights Results Aggregator

forthebadge made-with-go

GoDoc GitHub Pages Go Report Card Build Status Build Status codecov GitHub go.mod Go version License

Aggregator service for insights results

Description

Insights Results Aggregator is a service that provides Insight OCP data (officially called recommendations) that are being consumed by OpenShift Cluster Manager (OCM), Advanced Cluster Manager (ACM), and OCP WebConsole via Insights Operator. That data contain information about clusters status (especially health, security, performance, etc.) and recommendations based on results generated by Insights rules engine. Insights OCP data are consumed from selected broker, stored in different storages (that basically work as a cache) so we can expose it via REST API endpoints.

Documentation

Documentation is hosted on Github Pages https://redhatinsights.github.io/insights-results-aggregator/. Sources are located in docs.

Makefile targets

clean                Run go clean
build                Build binary containing service executable
build-cover          Build binary with code coverage detection support
fmt                  Run go fmt -w for all sources
lint                 Run golint
vet                  Run go vet. Report likely mistakes in source code
cyclo                Run gocyclo
ineffassign          Run ineffassign checker
shellcheck           Run shellcheck
errcheck             Run errcheck
goconst              Run goconst checker
gosec                Run gosec checker
abcgo                Run ABC metrics checker
json-check           Check all JSONs for basic syntax
style                Run all the formatting related commands (fmt, vet, lint, cyclo) + check shell scripts
run                  Build the project and executes the binary
test                 Run the unit tests
cover                Generate HTML pages with code coverage
coverage             Display code coverage on terminal
integration_tests    Run all integration tests
rest_api_tests       Run REST API tests
before_commit        Checks done before commit
help                 Show this help screen
function_list        List all functions in generated binary file

Usage

Usage:

    ./insights-results-aggregator [command]

The commands are:

    <EMPTY>             starts aggregator
    start-service       starts aggregator
    help                prints help
    print-help          prints help
    print-config        prints current configuration set by files & env variables
    print-env           prints env variables
    print-version-info  prints version info
    migration           prints information about migrations (current, latest)
    migration <version> migrates database to the specified version

BDD tests

Behaviour tests for this service are included in Insights Behavioral Spec repository. In order to run these tests, the following steps need to be made:

  1. clone the Insights Behavioral Spec repository
  2. go into the cloned subdirectory insights-behavioral-spec
  3. run the insights_results_aggregator_tests.sh from this subdirectory

List of all test scenarios prepared for this service is available at https://redhatinsights.github.io/insights-behavioral-spec/feature_list.html#insights-results-aggregator

Package manifest

Package manifest is available at docs/manifest.txt.