0

大家早上好,我目前正在构建一个工具,该工具使用 AUX 和 Shell 脚本每分钟从多个不同服务器上的各种日志中抓取大量数据。目前,我的脚本也每分钟生成 HTML 文件,以便我可以回顾并查看任何给定分钟的系统运行状况。所以本质上这些HTML文件被用作归档介质,这显然很奇怪。

推进这个工具,我希望在 DOJO 平台上构建一个前端,该平台将支持从日志中收集的每个不同数据集的小部件和图表。过去我使用 DOJO 的次数不多,希望在该技术方面更有经验的人能够告诉我应该使用哪种存储介质来存储脚本每分钟生成的这些简单指标。我听说过 JSON 方法,但不确定。

谢谢你的时间!

强尼

4

1 回答 1

0

只是为了跟进这一点,以防止其他用户偶然发现它。我认为 JSON 绝对是前进的方向。每分钟我都有一个生成如下 JSON 文件的系统。

{
"DataDTS"   : "2014.05.02-09:00",
"System"    : "Performance Test",
"SourceServer"  : "gb02qws122debx7",
"OldestData"    : "2014.05.02-09:00",

"MetricData" : {

    "FredHopper Direct" : {
        "Small" : "FH",
        "Type" : "ByMinute",
        "HeaderLevels" : 1,
        "Data": { "Failures":0, "Avg":"0.318", "Min":"0.306", "Max":"0.340" }
    },

    "Performance By Instance" : {
        "Small" : "RATE",
        "Type" : "ByMinute",
        "HeaderLevels" : 2,
        "Sections" : {
            "102.01" : { "Attributes" : ["(20)"], "Data": { "Req":"999", "Avg Resp":"0.254" } },
            "102.02" : { "Attributes" : ["(20)"], "Data": { "Req":"144", "Avg Resp":"0.376" } },
            "103.01" : { "Attributes" : ["(20)"], "Data": { "Req":"168", "Avg Resp":"0.199" } },
            "103.02" : { "Attributes" : ["(20)"], "Data": { "Req":"152", "Avg Resp":"0.283" } },
            "Unallocated" : { "Attributes": [], "Data": {"Req":"87", "Avg Resp":"0.154"} },
            "qws122" : { "Attributes": [], "Data": {"Tot Req":"460", "Rate PPS":"7.7"} }
        }
    },


    "HTML Status" : {
        "Small" : "HTML",
        "Type" : "Status",
        "HeaderLevels" : 1,
        "Data" : [
            { "Code":"200", "Req":447 },
            { "Code":"206", "Req":1 },
            { "Code":"301", "Req":7 },
            { "Code":"302", "Req":5 },
            { "Code":"TOT", "Req":460 }
        ]
    },

    "Page Breakdown" : {
        "Small" : "PB",
        "Type" : "Status",
        "HeaderLevels" : 2,
        "Sections" : {
            "Top 15 Average Response Times" : { 
                "Attributes": [],
                "Data" : [
                    { "URL":"men", "Req":1, "Avg Resp":"3.597", "Cached":"0.0%" },
                    { "URL":"jacques-vert", "Req":1, "Avg Resp":"3.335", "Cached":"0.0%" },
                    { "URL":"OrderOKView", "Req":1, "Avg Resp":"1.615", "Cached":"0.0%" },
                    { "URL":"warehouse", "Req":1, "Avg Resp":"1.050", "Cached":"0.0%" }
                ]
            },                  
            "Top 15 Requests" : {
                "Attributes": [],
                "Data" : [
                    { "URL":"Navigate", "Req":220, "Avg Resp":"0.372", "Cached":"26.4%" },
                    { "URL":"prod", "Req":42, "Avg Resp":"0.186", "Cached":"13.5%" },
                    { "URL":"sureroute-test-object.html", "Req":24, "Avg Resp":"0.001", "Cached":"0.0%" },
                    { "URL":"TopCategories1", "Req":8, "Avg Resp":"0.032", "Cached":"0.0%" }
                ]
            }
        }
    },

    "App server CPU" : {
        "Small" : "CPU",
        "Type" : "ByMinute",
        "HeaderLevels" : 2,
        "Sections" : {
            "qap302" : { "Attributes" : ["Ent:7.0", "Max:8.0", "Mem:32768MB", "Wgt:200"], "Data": { "usr%":"16.8", "iow%":"1.4", "phy":"1.8", "ent%":"25.1" } },
            "qap312" : { "Attributes" : ["Ent:7.0", "Max:8.0", "Mem:32768MB", "Wgt:200"], "Data": { "usr%":"8.1", "iow%":"0.1", "phy":"0.8", "ent%":"11.0" } }
        }
    }

}
于 2014-05-29T10:01:58.793 回答