Send Docs Feedback

Adding a new analytics group

Edge for Private Cloud v. 4.17.01

When you install Edge for the Private Cloud, by default the installer creates a single analytics group named "axgroup-001". At install time, you can change the default name of the analytics group by including the AXGROUP property in the installation config file: 

# Specify the analytics group. 
# AXGROUP=axgroup-001          # Default name is axgroup-001.

See Install Edge components on a node for more.

Use the procedure below if you later want to add a new analytics group to your installation:

  1. Create and configure the new analytics group:
    1. Create the analytics group, named analyticsNew:
      > curl -u sysAdminEmail:passWord -H "Content-Type: application/json" -X POST 'https://<MS_IP>:8080/v1/analytics/groups/ax/axgroupNew'
    2. Add a consumer group to the new analytics group, named consumer-group-new. ​Consumer group names are unique within the context of each analytics group:
      > curl -u sysAdminEmail:passWord -X POST -H 'Accept:application/json' -H 'Content-Type:application/json' "https://<MS_IP>:8080/v1/analytics/groups/ax/axgroupNew/consumer-groups?name=consumer-group-new"
    3. Set the consumer type of the analytics group to "ax":
      > curl -u sysAdminEmail:passWord -X POST -H "Content-Type:application/json" "https://<MS_IP>:8080/v1/analytics/groups/ax/axgroupNew/properties?propName=consumer-type&propValue=ax"
    4. Add the data center name. By default, you install Edge with a data center named "dc-1". However, if you have multiple data centers, they each have a unique name. This call is optional if you only have a single data center, and recommended if you have multiple data centers: 
      > curl -u sysAdminEmail:passWord -X POST -H "Content-Type:application/json" "https://<MS_IP>:8080/v1/analytics/groups/ax/axgroupNew/properties?propName=region&propValue=dc-1"
  2. Add the UUIDs of the Postgres servers to the new analytics group. If you have configured two Postgres servers to function as a master/standby pair, specify both as a comma-separated list of UUIDs.
    1. To get the UUIDs of the Postgres servers, run the following cURL command on every Postgres server node: 
      > curl -u sysAdminEmail:passWord  https://<PG_IP>:8084/v1/servers/self  
    2. If you only have a sinlge Postgres server, add it to the analytics group:
      > curl -u sysAdminEmail:passWord -H "Content-Type: application/json" -X POST 'https://<MS_IP>:8080/v1/analytics/groups/ax/axgroupNew/servers?uuid=UUID&type=postgres-server&force=true'

      If you have multiple Postgres servers configured as a master/standby pair, then add them by specifying a comma-separated list of UUIDs:
      > curl -u sysAdminEmail:passWord -H "Content-Type: application/json" -X POST 'https://<MS_IP>:8080/v1/analytics/groups/ax/axgroupNew/servers?uuid=UUID_Master,UUID_standby&type=postgres-server&force=true'

      This command returns the information about the analytics group, including the UUID of the Postgres server in the postgres-server property under uuids:
      {
        "name" : "axgroupNew",
        "properties" : {
          "region" : "dc-1",
          "consumer-type" : "ax"
        },
        "scopes" : [ ],
        "uuids" : {
          "qpid-server" : [ ],
          "postgres-server" : [ "2cb7211f-eca3-4eaf-9146-66363684e220" ]
        },
        "consumer-groups" : [ {
          "name" : "consumer-group-new",
          "consumers" : [ ],
          "datastores" : [ ],
          "properties" : {
          }
        } ],
        "data-processors" : {
        }
    3. Add the Postgres server to the data store of the consumer group. This call is required to route analytics messages from the Qpid servers to the Postgres servers:
      > curl -u sysAdminEmail:passWord -X POST -H 'Accept:application/json' -H 'Content-Type:application/json' "https://<MS_IP>:8080/v1/analytics/groups/ax/axgroupNew/consumer-groups/consumer-group-new/datastores?uuid=UUID"

      If multiple Postgre servers are configured as a master/standby pair, then add them by specifying a comma-separated list of UUIDs:
      > curl -u sysAdminEmail:passWord -X POST -H 'Accept:application/json' -H 'Content-Type:application/json' "https://<MS_IP>:8080/v1/analytics/groups/ax/axgroupNew/consumer-groups/consumer-group-new/datastores?uuid=UUID_Master,UUID_standby"

      The UUID appears in the datastores property of the consumer-groups in the output.
  3. Add the UUIDs of all Qpid servers to the new analytics group. You must perform this step for all Qpid servers.
    1. To get the UUIDs of the Qpid servers, run the following cURL command on every Qpid server node: 
      > curl -u sysAdminEmail:passWord  https://<QP_IP>:8083/v1/servers/self 
    2. Add the Qpid server to the analytics group:
      > curl  -u sysAdminEmail:passWord -H "Content-Type: application/json" -X POST 'https://<MS_IP>:8080/v1/analytics/groups/ax/axgroupNew/servers?uuid=UUID&type=qpid-server'
    3. Add the Qpid server to the consumer group:
      > curl  -u sysAdminEmail:passWord -X POST -H 'Accept:application/json' -H 'Content-Type:application/json' "https://<MS_IP>:8080/v1/analytics/groups/ax/axgroupNew/consumer-groups/consumer-group-new/consumers?uuid=UUID"

      This call returns the following where you can see the UUID of the Qpid server added to the qpid-server property under uuids, and to the consumers property under consumer-groups:
      {
        "name" : "axgroupNew",
        "properties" : {
          "region" : "dc-1",
          "consumer-type" : "ax
        },  "scopes" : [ ],
      "uuids" : {
          "qpid-server" : [ "fb6455c3-f5ce-433a-b98a-bdd016acd5af" ],
          "postgres-server" : [ "2cb7211f-eca3-4eaf-9146-66363684e220" ]
        },
        "consumer-groups" : [ {
          "name" : "consumer-group-new",
          "consumers" : [ "fb6455c3-f5ce-433a-b98a-bdd016acd5af" ],
          "datastores" : [ "2cb7211f-eca3-4eaf-9146-66363684e220" ],
          "properties" : {
          }
        } ],
        "data-processors" : {
       }
  4. Provision an organizations and environment for the new AX group.
    > curl -u sysAdminEmail:passWord -X POST "https://<MS_IP>:8080/v1/analytics/groups/ax/axgroupNew/scopes?org=org_name&env=env_name" -H "Content-Type: application/json"
 

Help or comments?