Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Dashboard Examples

Tom Valine edited this page Oct 13, 2016 · 14 revisions

Examples & Screencasts


Argus SDK

This simple example illustrates how to create a new alert, trigger and notifier. Alerts can have one or more notifiers and one or more triggers with a many to many mapping between the two. Take note of the call to the linkTrigger method.

int maxConnections = 10;
try (
    ArgusService service = ArgusService.getInstance(
      "https://argus.mycompany.com/argusws",
      maxConnections)
) {
    String content = 
            "<ag-dashboard>\n"
            + "  <ag-chart name='testChart'>\n"
            + "    <ag-option name='yAxis.min' value='0'></ag-option>\n"
            + "    <ag-metric name='testMetric'>\n"
            + "      -1d:TestScope:TestMetric:TestNamespace{TestTag=TagValue}:min\n"
            + "    </ag-metric>\n"
            + "  </ag-chart>\n"
            + "</ag-dashboard>";
    service.getAuthService().login("aUsername", "aPassword");
    Dashboard dashboard = new Dashboard();
    dashboard.setName("TestDashboard");
    dashboard.setDescription("A test dashboard.");
    dashboard.setShared(true);
    dashboard.setContent(content);
    dashboard = service.getDashboardService().createDashboard(dashboard);
    service.getAuthService().logout();
}
Clone this wiki locally