Contact Groups

Use contact groups to get messages and alerts to the right people, at the right time, and in the right way. You can direct messages to certain groups, define easy to maintain on-call rotations, and implement message queuing to reduce inbox overflow. This is all accomplished by setting up a simple configuration file for each group.

Create a new global contact group.

# Create a group called "ops" by copying the delivered "admins" file to the global contact groups directory.
$ cp "${arcHome}/config/contact_groups/admins" "${arcGlobalHome}/config/contact_groups/ops"
# Edit "ops" group by editing the file.
$ vi "${arcGlobalHome}/config/contact_groups/ops"
# Refresh the contact groups.
$ contact_groups_refresh
Contact groups have been refreshed.

Make changes to an existing delivered group.

# Copy the delivered "admins" file to the global contact groups directory.
$ cp "${arcHome}/config/contact_groups/admins" "${arcGlobalHome}/config/contact_groups"
# Edit "admins" group by editing the file.
$ vi "${arcGlobalHome}/config/contact_groups/admins"

Return information about your contact group configuration.

$ contact_groups_show

# admins

> config_list_all_objects -a contact_groups

${arcHome}: '/media/sf_temp/arcshell/config/contact_groups'
${arcGlobalHome}: '/media/sf_temp/arcshell/arc/config/contact_groups'
${arcUserHome}: '/home/ethan/arcshell/config/contact_groups'

Review the content of the default delivered “admins” group. Read the comments to get an understanding of each configuration option.

Messages can be directed to specific groups. If a specific group is not specified ArcShell will look for one or more enabled default groups to direct the message to.

If ArcShell can’t find a group to send the message to it is sent to the address defined by the ${arcAdminEmails} function. This variable is initially defined in ${HOME}/.arcshell but this value could be over-ridden in any of the “arcshell.config” files.

$ cat "${arcHome}/config/contact_groups/admins"
# [*] Accepts "truthy" values to include cron expressions.

# Email address list for the group.
# group_emails="${email},${email}"
# group_emails= 

# SMS text email address list for the group.
# group_texts="${email},${email}"
# group_texts=

# Is a default group? [*]
# group_default_group=

# Is group enabled? [*]
# group_enabled=

# Is disabled? [*]
# group_disabled=

# Is on hold? [*]
# group_hold=

# Disable texts? [*]
# group_disable_texts= 

# Send queued emails if oldest item in queue is older than X seconds.
# group_max_email_queue_seconds=

# Send queued emails if queue has been idle for X seconds.
# group_max_email_queue_idle_seconds=

# Send queued emails if number of items in queue exceeds X.
# group_max_email_queue_count=

# Send queued texts if oldest item in queue is older than X seconds.
# group_max_text_queue_seconds=



Return information about the contact groups.

> contact_groups_show


Loads a group into the current shell.

> eval "$(contact_groups_load 'group_name')"


Return true if the contact group exists.

> contact_group_exists "group_name"


Returns true if group is “enabled” and not “disabled”.

> contact_group_is_enabled "group_name"


Return the number of enabled contact groups.

> contact_group_enabled_count


Return the list of all groups.

> contact_groups_list [-l|-a]
# -l: Long list. Include file path to the groups configuration file.
# -a: All. List every configuration file for every group.


Return the list of groups which are currently enabled.

> contact_groups_list_enabled


Return a comma delimited list of the default groups, they are not necessarily enabled.

> contact_groups_list_default


Rebuilds objects when a contact group config file has been changed.

> contact_groups_refresh


Send a test message to “group_emails” and “group_texts” addresses.

> contact_groups_test "group_name"


Delete a contact group.

> contact_groups_delete "group_name"