Previous Topic: log ObjectNext Topic: ha Object


msg Object

Use this object to view message related events on a VDC.

Method

Description

list

Retrieve list of dashboard messages

destroy

Destroy dashboard message

destroy_all

Destroy all messages

get

Get message text and attributes

set

 Set text/attributes of a dashboard message

list Method (msg Object)
Description

Retrieve list of dashboard messages

Syntax
/api/v2/msg/list?vdc=controller-name 
Arguments
vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Retrieve list of dashboard messages.

GET http://192.168.123.200/api/v2/msg/list?vdc=mygrid 
Sample Output
XML:
<messages>
   <message>
      <name>M020_grid_progress</name>
      <id>020_grid_progress</id>
      <severity>info</severity>
      <text>Grid recovery completed on Jul 20, 2010 at 19:01:42: There were 1 active application(s) when the grid controller went down. 1 application(s)have been recovered.</text>
      <timestamp>1279677702</timestamp>
   </message>
   <message>
      <name>M400_alert_srv1</name>
      <id>400_alert_srv1</id>
      <severity>alert</severity>
      <text>Multiple alarms have occurred for server srv1. Last alarm occurred on Jul 21, 2010 at 08:54:23:CRITICAL: possible storage system failure on server srv1. Error: Device: /dev/sda, not capable of SMART self-check. See http://doc.3tera.net/AppLogic29/RefStorageFailureDetection.html for recommended actions.</text>
      <timestamp>1279727663</timestamp>
   </message>
   <message>
      <name>M500_3tctlmon_report</name>
      <id>500_3tctlmon_report</id>
      <severity>alert</severity>
      <text>Grid restarted by operator on Jul 20, 2010 at 18:58:38.</text>
      <timestamp>1279677561</timestamp>
   </message>
</messages> 
JSON:
{
   "message" : [
      {
         "timestamp" : "1279677702",
         "text" : "Grid recovery completed on Jul 20, 2010 at 19:01:42: There were 1 active application(s) when the grid controller went down. 1 application(s) have been recovered.",
         "name" : "M020_grid_progress",
         "id" : "020_grid_progress",
         "severity" : "info"
      },
       {
         "timestamp" : "1279727663",
         "text" : "Multiple alarms have occurred for server srv1. Last alarm occurred on Jul 21, 2010 at 08:54:23:CRITICAL: Possible storage system failure on server srv1. Error: Device: /dev/sda, not capable of SMART self-check. See http://doc.3tera.net/AppLogic29/RefStorageFailureDetection.html for recommended actions.",
         "name" : "M400_alert_srv1",
         "id" : "400_alert_srv1",
         "severity" : "alert"
      },
      {
         "timestamp" : "1279677561",
         "text" : "Grid restarted by operator on Jul 20, 2010 at 18:58:38.",
          "name" : "M500_3tctlmon_report",
         "id" : "500_3tctlmon_report",
          "severity" : "alert"
      }
   ]
} 

destroy Method (msg Object)
Description

Destroy a dashboard message

Syntax
/api/v2/msg/destroy?id=id&vdc=controller-name 
Arguments
id

Message ID - must be in the form 'NNN<text>'

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Destroy a dashboard message with id 123MSG.

GET http://192.168.123.200/api/v2/msg/destroy?id=123MSG&vdc=mygrid 
Sample Output
XML:
<message></message>
JSON:
{
   "message" :""
}

destroy_all Method (msg Object)
Description

Destroy all dashboard messages

Syntax
/api/v2/msg/destroy_all?vdc=controller-name 
Arguments
vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Destroy all dashboard messages.

GET http://192.168.123.200/api/v2/msg/destroy_all?vdc=mygrid 
Sample Output
XML:
<opt></opt>
JSON:
{}

get Method (msg Object)
Description

Get text/attributes of a dashboard message

Syntax
/api/v2/msg/get?id=id&vdc=controller-name 
Arguments
id

Message ID - must be in the form 'NNN<text>'

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Get text of message with id 123MSG.

GET http://192.168.123.200/api/v2/msg/get?id=123MSG&vdc=mygrid 
Sample Output
XML:
<message> 
   <name>123MSG</name> 
   <id>123MSG</id> 
   <severity>info</severity> 
   <text>Test message</text> 
   <timestamp>1271980131</timestamp> 
</message> 
JSON:
{ 
   "message" : {
   "timestamp" : "1271980131", 
   "text" : "Test message", 
   "name" : "123MSG", 
   "id" : "123MSG", 
   "severity" : "info" 
} 

set Method (msg Object)
Description

Set text/attributes of a dashboard message

Syntax
/api/v2/msg/set?id=id&severity=severity&text="text"&vdc=controller-name 
Arguments
id

Message ID - must be in the form 'NNN<text>'

severity

Message severity, may be 'info' or 'alert'

text

Message text

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Create a message "test" with severity info.

GET http://192.168.123.200/api/v2/msg/set?id=123MSG&severity=info&text="Test"&vdc=mygrid 
Sample Output
XML:
<message></message>
JSON:
{
   "message" :""
}