Boolean Rule

Overview

Object name: BOOLEANRULE

Show

In order to list available boolean rules, use SHOW action:

[root@centreon ~]# ./centreon -u admin -p centreon -o BOOLEANRULE -a SHOW
id;name;expression;bool_state
8;rule1;expression1;1
9;rule2;expression2;1
[...]

Columns are the following:

Column Description
Rule ID Boolean rule id
Rule name Boolean rule name
Rule expression Boolean rule expression
Bool state Impact is applied when expression returns this state

Add

In order to add a boolean rule use ADD action:

[root@centreon ~]# ./centreon -u admin -p centreon -o BOOLEANRULE -a ADD -v 'rule1;expression1;1'

Required columns are the following:

Column Description
Rule name Boolean rule name
Rule expression Boolean rule expression
Bool state Impact is applied when expression returns this state

Del

If you want to remove a boolean rule use DEL action:

[root@centreon ~]# ./centreon -u admin -p centreon -o BOOLEANRULE -a DEL -v 'rule1'

Setparam

If you want to change a specific parameters for a boolean rule, use the SETPARAM command:

[root@centreon ~]# ./centreon -u admin -p centreon -o BOOLEANRULE -a setparam -v 'rule1;expression;new expression'

Parameters that you can change are the following:

Parameter Description
name Boolean rule name
expression Boolean rule expression
bool_state Impact is applied when expression returns this state