Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Retrieve graphs for specific metrics for a single server.
*
* This example shows how to use the SoftLayer API to retrieve graphs for the
* specific Advanced Monitoring metrics for a single hardware or virtual guest
* server instance.
*
* We will call the SoftLayer API to retrieve the monitoring agents,
* configuration template, and configuration values for a server instance.
<?php
/**
* Add new configuration for a monitoring agent.
*
* This example shows how to use the SoftLayer API to add new configuration for a monitoring agent for the hardware or virtual guest
* server instance.
*
* @license <http://sldn.softlayer.com/wiki/index.php/License>
* @author SoftLayer Technologies, Inc. <sldn@softlayer.com>
*/
@willjohnson
willjohnson / README.md
Last active April 26, 2022 19:32
Server Status Widget for Dashing

Description

A Dashing widget that checks whether a server is responding to either an http or ping request. It displays either a check or alert depending on the response.

Usage

@underscorephil
underscorephil / deleteMonitoringNotification.py
Created October 10, 2013 20:31
Delete a notification object
import SoftLayer.API
from pprint import pprint as pp
apiUsername = ''
apiKey = ''
client = SoftLayer.Client(
username=apiUsername,
api_key=apiKey,
)
<?php
/**
* Add new configuration for a monitoring agent.
*
* This example shows how to use the SoftLayer API to add new configuration for a monitoring agent for the hardware or virtual guest
* server instance.
*
* @license <http://sldn.softlayer.com/wiki/index.php/License>
* @author SoftLayer Technologies, Inc. <sldn@softlayer.com>
*/
@larryli
larryli / cgi.go
Last active March 5, 2024 17:14
golang net/http/cgi example
// go build -ldflags "-s -w" -o index.cgi cgi.go
package main
import (
"fmt"
"net/http"
"net/http/cgi"
)
@ryanrhanson
ryanrhanson / acctAlarms.py
Last active August 29, 2015 13:56
Retrieve all active nimsoft alarms on account
import SoftLayer
apiUser = (api username)
apiKey = (api key)
client=SoftLayer.Client(username=apiUser,api_key=apiKey)
acctalarms=client['Account'].getActiveAlarms()
for alarm in acctalarms:
hostname = client['Monitoring_Robot'].getObject(id=alarm['robotId'],mask="mask[softwareComponent[virtualGuest,hardware]]")
from pprint import pprint as pp
import SoftLayer
client = SoftLayer.Client()
mgr = SoftLayer.CCIManager(client)
serverId = 1234
mask = ('mask[monitoringAgents[id,name,statusName]]')
server = mgr.get_instance(serverId, mask=mask)
pp(server)
<?php
/**
* Retrieve metric data for a single server.
*
* This example shows how to use the SoftLayer API to retrieve metric data for
* Advanced Monitoring on a single hardware or virtual guest server instance.
*
* We will call the SoftLayer API to retrieve the monitoring agents,
* configuration template, and configuration values for a server instance.
* Then we will demonstrate how to find definitions that you have enabled for
import SoftLayer.API
from pprint import pprint as pp
apiUsername = 'set me'
apiKey = 'set me'
client = SoftLayer.Client(
username=apiUsername,
api_key=apiKey,
)