# Moogsoft Docs

#### Custom Info

Custom_info fields are customizable fields relating to either an Alert or a Situation that can be added to Moogsoft AIOps during configuration.

These will be displayed in the UI as columns in the Alerts and Situations Views and can be configured with optional sorting and filtering.

### Note

Please note: Custom_Info commands can be found in the usr/share/moogsoft/bin/utils folder

The following commands can be used to add either Alert or Situation custom_info fields:

Command

Description

moog_add_alert_custom_field

moog_add_sitn_custom_field

This adds a new Situation custom_info field

To configure the display name, the field name and indexing, there are a number of options that can be used:

Option

Description

-d, --display_name <arg>

The display name of the field in the UI

-f, --field <arg>

The custom_info field name

-i, --index

This indicates the field is indexed for filtering and sorting

### Note

Please note: This cannot be used with display only fields

If you are planning to use this custom_info field in Alert or Situation filters or you are planning to sort using this column we recommend you use the --index option to aid filter loading performance

Too many indexed columns may affect the performance of additions

-l, --loglevel <arg>

Specify (INFO| WARN| ALL) to select the amount of debug output

-o, --display_only

This indicates the field is for display only and cannot be used to filter, sort or search

-s, --size <arg>

The index size (the number of characters). This is valid for indexed text fields only. The default is 50

-t, --type <arg>

The type of field (number or text). The default is number

The example below shows how to add an alert custom_info text field which is also an indexed so will be filterable:

[root@moogsoft ~]# moog_add_alert_custom_field -d newfield -f new_field -i -t TEXT

The addition of the new custom info field is confirmed with a message similar to the following:

Field newfield was added to UI successfully
Filterable field custom_info.new_field was added successfully
##### Filling Custom Info Fields

There is a utility that allows you to fill the Alerts or Situations filterable custom info fields using retrospective data:

Command

Description

moog_fill_alert_custom_field

This fills the filterable Alert custom info fields using retrospective data

moog_fill_sitn_custom_field

This fills the filterable Situation custom info fields using retrospective data

The amount of time the fill utility goes back and the log level can be configured using the following options:

Option

Description

-b, --back <arg>

This defines how far back the fill utility will go back, with 's' for seconds, 'm' for minutes, 'h' for hours, 'd' for days and 'w' for weeks

E.g. -b 2w for two weeks

### Note

Please note: You can leave empty for all but this might take some time

-l, --loglevel <arg>

Specify (INFO| WARN| ALL) to choose the amount of debug output

###### Filling Custom_Info Example

The example below shows how to fill Situation custom info fields with retrospective data from the past three days:

[root@centos7 ~]# moog_fill_sitn_custom_fields -b 3d
Filterable custom info data was filled successfully
##### Removing Custom_Info Fields

The following commands can be used to remove previously configured Alert or Situation custom info fields:

Command

Description

moog_remove_alert_custom_field

This removes a Alert custom info field

moog_remove_sitn_custom_field

This removes a Situation custom info field

After entering the command, type -f and enter the custom info field name to select the field you want to remove.

###### Removing Custom_Info Example

The example below shows how to remove a custom info field called 'new_field'.

[root@moogsoft ~]# moog_remove_alert_custom_field -f new_field
Field custom_info.new_field was removed successfully
##### Configure Custom Info Search

You must run a utility if custom info columns are added and existing Alerts or Situations contain values in that column for them to be filterable in the UI. Alert or Situations which are new or updated after the new column has been added will be filterable automatically.

If an alert custom info field has been added, run $MOOGSOFT_HOME/bin/utils/moog_fill_alert_custom_fields. If a Situation custom info field has been added, run $MOOGSOFT_HOME/bin/utils/moog_fill_sitn_custom_fields.