Support Center Home


About the Widget Resource

Overview

You can use LogicMonitor’s REST API to programmatically manage your dashboard widgets:

As with all of our API calls, authentication is required.

Resource URI

URI: /dashboard/widgets

Resource Properties

Global Properties

All widgets have the following properties.

Property Description Type Example
idThe Id of the widgetInteger“id”:23
nameThe name of the widgetString“name”:”Apache Requests”
descriptionThe description of the widgetString“description”:”My Widget Description”
typealert | deviceNOC | html | serviceOverallStatus | sgraph | ngraph | serviceNOC | serviceSLA | bigNumber | gmap | serviceIndividualStatus | gauge | pieChart | ngraph | batchjob”String“type”:”alert”
lastUpdatedOnThe time that corresponds to when the widget was last updated, in epoch formatInteger“lastUpdatedOn”:1453916464
lastUpdatedByThe user that last updated the widgetString“lastUpdatedBy”:”Sarah”
dashboardIdThe id of the dashboard the widget belongs toInteger“dashboardId”:50
columnIdxThe column of widget’s position on the dashboard. The far left column is column=0Integer“columnIdx”:1
orderThe order in which the widget is displayed in the column. The top position is order=0Integer“order”:0
themeThe color scheme of the widget. Options are: borderPurple | borderGray | borderBlue | solidPurple | solidGray | solidBlue | simplePurple | simpleBlue | simpleGray | newBorderGray | newBorderBlue | newBorderDarkBlue | newSolidGray | newSolidBlue | newSolidDarkBlue | newSimpleGray | newSimpleBlue |newSimpleDarkBlueString“theme”:”simplePurple”
colSpanThe number of columns the widget’s width should consumeInteger“colSpan”:1
rowSpanThe number of rows the widget’s height should consumeInteger“rowSpan”:1
userPermissionThe permission level of the user who last modified the widgetString“userPermission”:”write”
intervalThe refresh interval of the widget, in minutesInteger“interval”:1
timescaleThe default timescale of the widgetString“timescale”:”day”
extraOnly applies to alert widgetsJSON Object

Widget-Specific Properties

Additional fields apply to widgets depending upon their type, see the below sections:

Alert Widget Properties

All widgets of type alert (alert widgets) include an object extra that contains any UI display settings configured for the widget, and a filters object with the following fields.

Property Description Type Example
groupDisplayed alerts must be associated with groups that meet this filter criteria. Glob is accepted, and * and an empty string both indicate all groups.String“group”:”Relay*”
hostDisplayed alerts must be associated with devices that meet this filter criteria. Glob is accepted, and * and an empty string both indicate all devices.String“host”:”*”
dataSourceDisplayed alerts must be associated with datasources that meet this filter criteria. Glob is accepted, and * and an empty string both indicate all datasources.String“dataSource”:”*”
instanceDisplayed alerts must be associated with instances that meet this filter criteria. Glob is accepted, and * and an empty string both match all instances.String“instance”:”HTTP_Page-instance0″
dataPointDisplayed alerts must be associated with datapoints that meet this filter criteria. Glob is accepted, and * and an empty string both match all datapoints.String“dataPoint”:”*”
severityDisplayed alerts must have a severity that satisfies this criteria. Multiple severities are separated by commas.String“severity”:”warn”
ackedDisplayed alerts must have an acknowledgement status that satisfies this criteria.String“acked”:”all”
sdtedDisplayed alerts must have an SDT status that meets this criteria.String“sdted”:”all”
ruleDisplayed alerts must match a rule that satisfies this filter. Glob is accepted, and * and an empty string both match all rules. String“rule”:”*”
chainDisplayed alerts must be routed to an escalation chain that satisfies this filter. Glob is accepted, and * and an empty string both match all escalation chains. String“chain”:”*”
clearedDisplayed alerts must be active if cleared=no, and must have cleared in the past 7 days if cleared=all.String“cleared”:”no”

JobMonitor Widget Properties

All widgets of type batchjob (JobMonitor widgets) include the following fields.

Property Description Type Example
deviceDisplayNameThe display name of the device in LogicMonitor that the batchjob is running onString“deviceDisplayName”:”10.36.11.240″
batchJobNameThe name of the batchjob definition in LogicMonitorString“batchJobName”:”myBatchJob”
batchJobIdThe id of the batchjob definition in LogicMonitorInteger“batchJobId”:16

Big Number Widget

All widgets of type bigNumber (Big Number widgets) must include an object bigNumberInfo with the following fields.

Property Description Type Example
dataPointsThe datapoints included in the widget. Note that a datapoint must be referenced in the bigNumberItems object in order to be displayed. JSON Object“dataPoints”:[{“deviceGroupFullPath”:”Website”,”deviceDisplayName”:”ip-172-31-37-162.us-west-2.compute.interal”,”dataSourceFullName”:”CPU (NetSNMPCPUwithCores)”,”dataSourceId”:559,”instanceName”:”NetSNMPCPUwithCores-Core Count: 1″,”dataPointName”:”CPUBusyPercent”,”dataPointId”:2899,”name”:”CPUBusyPercent”,”aggregateFunction”:”max”}]
virtualDataPointsThe virtual datapoints included in the widget. Note that a virtual datapoint must be referenced in the bigNumberItems object in order to be displayed. JSON Object“virtualDataPoints”:[{“name”:”CPU Idle Percent”,”rpn”:”100 – CPUBusyPercent”}]
bigNumberItemsThe datapoints and virtual datapoints whose values should be displayed in the big number widgetJSON Object“bigNumberItems”:[{“position”:1,”rightLabel”:”%”,”bottomLabel”:””,”dataPointName”:”CPUBusyPercent”,”rounding”:”0″},{“position”:3,”rightLabel”:””,”bottomLabel”:”%”,”dataPointName”:”CPU Idle Percent”,”rounding”:”1″}]

Custom Graph Widget Properties

All widgets of type cgraph (Custom Graph widgets) must include an object graphInfo with the following fields.

Property Description Type Example
idThe unique id of the custom graph displayed by this widget (not to be confused with the widget id)Integer“id”:175
titleThe custom graph titleString“title”:”CPU Busy Percent”
aggregatetrue: You can set this field to true to aggregate results into one line.
false: Results will not be aggregated.
Boolean“aggregate”:true
top10Onlytrue: You can set this field to true to limit results to 10 lines. Note that only one of aggregate and top10Only can be set to true, as results cannot be both aggregated and limited.
false: Results will not be limited
Boolean“top10Only”:true
base1024Change base scale from 1000 to 1024Boolean“base1024”:false
maxValueThe maximum value that should be displayed on the y-axisInteger“maxValue”:100
minValueThe minimum value that should be displayed on the y-axisInteger“minValue”:0
verticalLabelThe label that will be display along the y axisString“verticalLabel”:”percent”
heightThe number of pixels tall the graph is. If the widget rowSpan is set to 1, this value will be 120.Integer“height”:120
widthThe number of pixels wide the graph is. If the widget rowSpan is set to 1, this value will be 360.Integer“width”:360
dataPointsThe datapoints added to the widget (note that a datapoint must be referenced in a graph line to be displayed)JSON Object“dataPoints”:[{“id”:13,”name”:”CPU”,”consolidateFunction”:2,”customGraphId”:202,”dataPointId”:2164,”dataPointName”:”CPU”,”deviceDisplayName”:”172.31.36.125″,”dataSourceFullName”:”CPU Cores-“,”instanceName”:”CPU Cores-196608″,”deviceId”:206},{“id”:14,”name”:”ExtendedStatusNotEnabled”,”consolidateFunction”:2,”customGraphId”:202,”dataPointId”:622,”dataPointName”:”ExtendedStatusNotEnabled”,”deviceDisplayName”:”ip-172-31-37-162.us-west-2.compute.interal”,”dataSourceFullName”:”Apache-“,”instanceName”:”Apache-80″,”deviceId”:39}]
virtualDataPointsThe virtual datapoints added to the widget (note that a virtual datapoint must be referenced in a graph line to be displayed)JSON Object“virtualDataPoints”:[{“id”:43,”customGraphId”:202,”name”:”VirtualDatapoint”,”rpn”:”(ExtendedStatusNotEnabled+1000)/50″}]
graphLinesThe graph lines to be displayed in the widget, where graph lines should reference the dataPoints and virtualDataPoints.JSON Object“graphLines”:[{“color”:”teal”,”customGraphId”:202,”dataPointName”:”ExtendedStatusNotEnabled”,”id”:304,”legend”:”##HOSTNAME##_##DATASOURCENAME##_##INSTANCE##”,”type”:3},{“color”:”aqua”,”customGraphId”:202,”dataPointName”:”VirtualDatapoint”,”id”:305,”legend”:””,”type”:2},{“color”:”Auto”,”customGraphId”:202,”dataPointName”:”CPU”,”id”:306,”legend”:”##HOSTNAME##_##DATASOURCENAME##_##INSTANCE##”,”type”:1}]

NOC Widget Properties

All widgets of type deviceNOC (NOC widgets) include the following fields.

Property Description Type Example
sortByHow NOC items are sortedString“sortBy”:”name”
displayColumnThe maximum number columns displayed in the NOC widgetInteger“displayColumn”:3
displayWarnAlertWhether or not warning alerts are displayed in the NOC widgetBoolean“displayWarnAlert”:true
displayErrorAlertWhether or not error alerts are displayed in the NOC widgetBoolean“displayErrorAlert”:true
displayCriticalAlertWhether or not critical alerts are displayed in the NOC widgetBoolean“displayCriticalAlert”:true
ackCheckedWhether or not acknowledgements are displayed in the NOC widgetBoolean“ackChecked”:true
sdtCheckedWhether or not SDTs are displayed in the NOC widgetBoolean“sdtChecked”:true
itemsThe NOC itemsJSON Object“items”:[{“deviceGroupFullPath”:”*”,”deviceDisplayName”:”ip-172-31-33-214.us-west-2.compute.internal”,”dataSourceDisplayName”:”HTTP-“,”instanceName”:”*”,”dataPointName”:”*”,”groupBy”:”device”,”name”:”##HOSTNAME## – HTTP content/function”},{“deviceGroupFullPath”:”*”,”deviceDisplayName”:”ip-172-31-33-214.us-west-2.compute.internal”,”dataSourceDisplayName”:”Apache-“,”instanceName”:”*”,”dataPointName”:”*”,”groupBy”:”device”,”name”:”##HOSTNAME## – Apache”},{“deviceGroupFullPath”:”*”,”deviceDisplayName”:”ip-172-31-33-214.us-west-2.compute.internal”,”dataSourceDisplayName”:”Host Status”,”instanceName”:”*”,”dataPointName”:”*”,”groupBy”:”device”,”name”:”##HOSTNAME## – Host Status”}]

HTML Widget Properties

All widgets of type html (HTML widgets) include an object ‘resources’ with the following fields.

Property Description Type Example
typehtml | iframeString“type”:”html”
URLIf type = html this should be a url, if type = iframe this should be an iframe.String“URL”:”https://api.logicmonitor.com”

Gauge Widget Properties

All widgets of type gauge (Gauge widgets) include the following fields.

Property Description Type Example
showPeakWhether or not the peak value is displayed on the gauge widgetBoolean“showPeak”:false
peakTimeRangeThe time range over which the peak value is determinedString“peakTimeRange”:”30days”
legendThe legend for the widget, displayed underneath the gaugeString“legend”:”Apache Accesses”
maxValueThe maximum value of the gauge widget, displayed on the right side of the gaugeInteger“maxValue”:5.0
minValueThe minimum value of the gauge widget, displayed on the left side of the gaugeInteger“minValue”:0.0
dataPointThe datapoint whose value is displayed in the gauge widgetJSON Object“dataPoint”:{“deviceGroupFullPath”:”*”,”deviceDisplayName”:”ip-172-31-33-214.us-west-2.compute.internal”,”dataSourceFullName”:”Apache-“,”dataSourceId”:124,”instanceName”:”*”,”dataPointName”:”BusyWorkers”,”dataPointId”:626,”aggregateFunction”:”max”,”dataSeries”:”average”,”rpn”:””}

Map Widget Properties

All widgets of type gmap (Map widgets) include an object mapPoints, where each mapPoint has the following fields.

Property Description Type Example
typeWhether or not the mapPoint represents a device or a groupString“type”:”group”
deviceGroupFullPathThe full path of the device group associated with the map point. This may be the group the map point represents, or the group of the device that the map point represents.String“deviceGroupFullPath”:”Production/AWS”
deviceDisplayNameThe display name of the device the map point represents (if type=device). This field supports Glob (*).String“deviceDisplayName”:”ProductionServer23″
hasLocationWhether or not the specified group or device has a location property defined.Boolean“hasLocation”:true

Normal Graph Widget (Device Graphs) Properties

All widgets of type ngraph (pinned device level graphs) include the following fields.

Property Description Type Example
hIdThe id of the device the graph was pinned fromInteger“hId”:199
dsiIdThe id of the datasource instance the graph was pinned fromInteger“dsiId”:2133
graphIdThe id of the datasource graph this widget was pinned fromInteger“graphId”:1042
graphNameThe id of the datasource graph this widget was pinned fromString“graphName”:Connections
hostNameThe display name of the device the graph was pinned fromString“hostName”:”server29.us-east-1.compute.internal”
dsNameThe name (not display name) of the datasource the graph is associated withString“dsName”:”Mysql-“
dsiNameThe name of the instance the graph was pinned fromString“dsiName”:”3306″

Pie Chart Widget Properties

All widgets of type pieChart (Pie Chart widgets) include an object pieChartInfo with the following fields.

Property Description Type Example
titleThe title that will be displayed above the pie chartString“title”:”CostPerRegion”
showLabelsAndLinesOnPCWhether or not labels and lines should be displayed on the pie chartBoolean“showLabelsAndLinesOnPC”:false
maxSlicesCanBeShownThe maximum number of slices you’d like displayed in the pie chartInteger“maxSlicesCanBeShown”:10
groupRemainingAsOthersIf the number of slices exceeds the maxSlicesCanBeShown, this value indicates whether the remaining slices should be grouped togetherBoolean“groupRemainingAsOthers”:false
dataPointsThe datapoints added to the widget. Note that datapoints must be included in the pieChartItems object to be displayed in the widget. JSON Object“dataPoints”:[{“deviceGroupFullPath”:”*”,”deviceDisplayName”:”eculler01.us-east-1.logicmonitor.net”,”dataSourceFullName”:”Ping”,”dataSourceId”:21,”instanceName”:”Ping”,”dataPointName”:”maxrtt”,”dataPointId”:123,”name”:”maxrtt”,”globMode”:true,”top10″:true,”aggregate”:false,”aggregateFunction”:”SUM”}]
virtualDataPointsThe virtual datapoints added to the widget. Note that virtual datapoints must be included in the pieChartItems object to be displayed in the widget. JSON Object“virtualDataPoints”:[{“name”:”1″,”rpn”:”maxrtt + 1000″},{“name”:”2″,”rpn”:”maxrtt + 2000″},{“name”:”3″,”rpn”:”maxrtt +500″},{“name”:”4″,”rpn”:”maxrtt + 4000″},{“name”:”5″,”rpn”:”maxrtt + 100″}]
pieChartItemsThe datapoints and virtual datapoints that will be displayed in the pie chartJSON Object“pieChartItems”:[{“dataPointName”:”5″,”legend”:”SA-EAST1″,”color”:”Auto”},{“dataPointName”:”4″,”legend”:”EU-CENTRAL1″,”color”:”Auto”},{“dataPointName”:”3″,”legend”:”US-WEST2″,”color”:”Auto”},{“dataPointName”:”2″,”legend”:”EU-WEST1″,”color”:”Auto”},{“dataPointName”:”1″,”legend”:”US-WEST1″,”color”:”Auto”}]

Service Individual Status Widget Properties

All widgets of type serviceIndividualStatus (Service Individual Status widgets) include the following fields.

Property Description Type Example
serviceFolderIdThe id of the group associated with the service that status is dispayed forInteger“serviceFolderId”:12
serviceIdThe id of the service that status is displayed forInteger“serviceId”:false
graphThe service graph name – this should always be checkpointStatusString“graph”:”checkpointStatus”
serviceNameThe name of the service that status is displayed forString“serviceName”:”CName_check”
serviceFolderNameThe group associated with the service that status is displayed forString“serviceFolderName”:”Production”
locationsThe checkpoint locations for which data is displayedJSON Object“locations”:[{“smgId”:2,”geoInfo”:”US – Washington DC”,”selected”:true},{“smgId”:3,”geoInfo”:”US – San Francisco”,”selected”:true},{“smgId”:4,”geoInfo”:”Europe – Dublin”,”selected”:true},{“smgId”:5,”geoInfo”:”Asia – Singapore”,”selected”:true},{“smgId”:6,”geoInfo”:”Sydney – Australia”,”selected”:false}]

Service NOC Widget Properties  

All widgets of type serviceNOC (Service NOC widgets) include the following fields.

Property Description Type Example
sortByHow NOC items are sortedString“sortBy”:”name”
displayColumnThe maximum number columns displayed in the NOC widgetInteger“displayColumn”:3
displayWarnAlertWhether or not warning alerts are displayed in the NOC widgetBoolean“displayWarnAlert”:true
displayErrorAlertWhether or not error alerts are displayed in the NOC widgetBoolean“displayErrorAlert”:true
displayCriticalAlertWhether or not critical alerts are displayed in the NOC widgetBoolean“displayCriticalAlert”:true
ackCheckedWhether or not acknowledgements are displayed in the NOC widgetBoolean“ackChecked”:true
sdtCheckedWhether or not SDTs are displayed in the NOC widgetBoolean“sdtChecked”:true
itemsThe NOC itemsJSON Object“items”:[{“serviceGroupName”:”Production”,”serviceName”:”*”,”groupBy”:”service”,”name”:”##SERVICE##”},{“serviceGroupName”:”Internal Services”,”serviceName”:”*”,”groupBy”:”service”,”name”:”##SERVICE##”}

Service Overall Status Widget Properties

All widgets of type serviceOverallStatus (Service Overall Status widgets) include a string serviceSelectMode set to either normal or group, and an object selectedServices with the following fields.

Property Description Type Example
serviceGroupIdThe id of the group for which member service status should be displayedInteger“serviceGroupId”:1
serviceGroupNameThe name of the group for which member service status should be displayedString“serviceGroupName”:”sarah”
chooseAllWhether or not all services in the group are included in the widget (this is equivalent to wildcarding the services field)Boolean“chooseAll”:false
servicesThe service that status is displayed forJSON Object“services”:[{“id”:21,”name”:”main page”}]

Service SLA Widget Properties  

All widgets of type serviceSLA (service SLA widgets) include the following fields.

Property Description Type Example
itemsThe services that should be used to compute the SLAJSON Object“items”:[{“serviceGroup”:”Production”,”service”:”*”},{“serviceGroup”:”Internal Services”,”service”:”*”}]

Device SLA Widget Properties

The following properties are specific to the deviceSLA widgets.

Property Description Type Example
metricsThe metrics (datapoints) that should be used to compute the SLA, where each service should include groupName (can be *), deviceName (can be *), dataSourceId or dataSourceFullName, instances (can be *), metric (datapoint), threshold, and exclusionSDTType (empty string means SDT periods will not be excluded, “group” means SDT periods at the device group level will be excluded, and “device” means SDT periods at the device level will be excluded)JSON Object“metrics”:[{“groupName”:”*”,”deviceName”:”*”,”dataSourceFullName”:”EC2 (AWS_EC2)”,”instances”:”*”,”metric”:”CPUUtilization”,”threshold”:”< 1″}]
daysInWeekThe days that SLA should be computed for, separated by commas. 1=Sunday, 2=Monday, 3=Tuesday, 4=Wednesday, 5=Thursday, 6=Friday, 7=Saturday.String“daysInWeek”:”1,2,3,4,5,6,7″
periodInOneDayThe period during the selected days that the SLA should be computed for. * = all day, or a time range can be specified in the format of “hh:mm TO hh:mm”, e.g. “01:15 TO 17:15”.String“periodInOneDay”:”08:00 TO 12:00″
unmonitoredTimeTypeHow no data should be treated: 0 = unmonitored time will be ignored & subtracted from the total possible time, 1 = unmonitored time will be subtracted from uptime and counted as a violation, 2 = unmonitored time will be added to uptime and counted as available.Integer“unmonitoredTimeType”:0
displayTypeWhether or not selected metrics should be combined into one number (displayType:0) or should be displayed individually, up to four metrics (displayType:1).Integer“displayType”:0
bottomLabelThe services that should be used to compute the SLA, where each service should include serviceGroup and serviceString“bottomLabel”:”Time Available”

Service Graph Widget (graphs pinned from the services tab) Properties

All widgets of type sgraph (graph pinned from the services page) include the following fields.

Property Description Type Example
serviceCheckpointIdThe id of the checkpoint this graph is associated withInteger“serviceCheckpointId”:99
graphThe name of the graph that was added as a widgetString“graph”:”responseTime”
serviceNameThe name of the service this graph is associated withString“serviceName”:”CName_check”
geoInfoThe checkpoint location this graph is associated withString“geoInfo”:”US – San Francisco”

Table Widget Properties

All widgets of type table (Table widgets) include three additional objects. A ‘columns’ object is included, where each column has the following fields.

Property Description Type Example
columnNameThe name for the columnString“columnName”:”CPU”
dataPointThe DataSource and DataPoint that are selected for the columnJSON Object“dataPoint”:{“dataSourceId”:7960532,”isMultiple”:true,”dataPointId”:5349,”dataSourceFullName”:”NetSNMPCPUwithCores”,”dataPointName”:”CPUBusyPercent”}
alternateDataPointsAny alternate DataSource and DataPoint combinations that should be selected for the columnJSON Object“alternateDataPoints”:[{“dataSourceId”:158,”isMultiple”:true,”dataPointId”:822,”dataSourceFullName”:”WinCPU”,”dataPointName”:”CPUBusyPercent”}]
enableForecastWhether or not forecasting is enabledBoolean“enableForecast”:true
roundingDecimalThe number of decimal points to round the value to. Options are 0, 1 and 2.Integer“roundingDecimal”:0
rpnThe expression in this field will be performed on the datapoint. The Column name should be referenced as the datapoint.String“rpn”:”100-CPU”

And a ‘rows’ object is included, where each row has the following fields.

Property Description Type Example
labelThe label for the rowString“label”:”ProdServer1″
groupIdThe ID of the group selected for the rowInteger“groupId”:7
groupFullPathThe full path of the group selected for the rowString“groupFullPath”:”US – LA/Website”
deviceIdThe id of the device selected for the rowInteger“deviceId”:12
deviceDisplayNameThe display name of the device selected for the rowString“deviceDisplayName”:”prodServer1″
instancesThe instances for each column of the rowJSON Object“instances”:[{“instanceId”:96678897,”instanceName”:”core1″,”dataPointName”:”CPUBusyPercent”,”dataPointId”:5349,”validationStatusCode”:0}]

And a ‘forecast’ object is included, with the following fields.

Property Description Type Example
timeRangeThe training data time range (the data on which forecasting is calculated). Options are Last 7 days, Last 14 days, Last 30 days, Last calendar month, Last 365 days or a custom time rangeString“timeRange”:”Last 7 days”
severityThe minimum alert severity the forecasting should include, one of warn | error | criticalString“severity”:”warn”
confidenceThe percent confidence that should be required for a forecasted alert.Integer“confidence”:90

Text Widget Properties

All widgets of type text (Text widgets) must include a content field.

Property Description Type Example
contentThe html content that the text widget should displayString“content”:”<p>Text Widget Content</p>”

In This Article