Skip to content

A tool to display, filter, ... content of bbdo files.

License

Notifications You must be signed in to change notification settings

bouda1/bbdo-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bbdo-tool

Introduction

If you use centreon-broker, maybe you saw files such as central-broker-master.queue.sql or central-broker-master.memory.sql or central-broker-master.unprocessed.

And if you saw them, maybe you wanted to know their content or even more to change their content.

So here is a tool for that purpose. It is not finished yet but begins to give results.

Installation

This software is written in Rust. So you need this language to compile it. The build/installation are then very simple (to install it into the /usr/local/bin directory), execute the following commands:

cd bbdo-tool
cargo build --release
cargo install --path . --root /usr/local

Usage

If you have a /var/lib/centreon-broker/central-broker-master.unprocessed file, you can see its content using the command:

bbdo-tool /var/lib/centreon-broker/central-broker-master.unprocessed

If the file to process has been generated by centreon-broker older than 20.10, you should consider to use the --deprecated option, for example:

bbdo-tool -d /var/lib/centreon-broker/central-broker-master.unprocessed

There are possibilities to filter the events to output:

  • with the --filter option: here, for each event we keep events where the content matches the given value.
  • with the --filter-event option: here, we keep events whose name is the one given.

The following command returns events of type NEB::ServiceCheck:

bbdo-tool --filter-event="NEB::ServiceCheck" file

The following command returns events where events contains host_id with value 2 and service_id with value 18:

bbdo-tool --filter='{ "host_id":2, "service_id":18 }' file

A -v option reverses the --filter queries.

To know how many events match a query, you can use the -c option.

And to know all the options, you can still enter:

bbdo-tool --help

Warnings.

  • All the BBDO are not yet implemented in bbdo-tool, so you can have incomplete results.
  • This software works with all bbdo files, compressed and not compressed.

About

A tool to display, filter, ... content of bbdo files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages