ダッシュボード メッセージのリストを表示します。
/api/v1/msg/list?vdc=controller-name
ターゲットの仮想データ センターの名前
同期
GET
ダッシュボード メッセージを一覧表示します。
GET http://192.168.123.200/api/v1/msg/list?vdc=mygrid
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"
}
]
}
JSON の出力はすべて UTF8 にエンコードされています。 UTF8 デコードを使用して UTF8 にエンコードされた出力をデコードします。
UTF8 にエンコードされた JSON 出力をデコードするシンプルな PHP スクリプトの例を以下に示します。
<?
$json = '{"a": "¥u00e3¥u0081¥u0082" }';
$j = json_decode($json);
echo utf8_decode($j->{'a'});
?>
| Copyright © 2011 CA. All rights reserved. | このトピックについて CA Technologies に電子メールを送信する |