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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SoftLayer.API | |
from pprint import pprint as pp | |
apiUsername = '' | |
apiKey = '' | |
client = SoftLayer.Client( | |
username=apiUsername, | |
api_key=apiKey, | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// go build -ldflags "-s -w" -o index.cgi cgi.go | |
package main | |
import ( | |
"fmt" | |
"net/http" | |
"net/http/cgi" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]]") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SoftLayer.API | |
from pprint import pprint as pp | |
apiUsername = 'set me' | |
apiKey = 'set me' | |
client = SoftLayer.Client( | |
username=apiUsername, | |
api_key=apiKey, | |
) |
OlderNewer