Filter by label
There are no items with the selected labels at this time.
Introduction
The SONARPLEX REST API offers an easy way to gather information and even post information to the SONARPLEX.
API Basics
Base URI | http(s)://example.com/{version}/{location}/{resource}/ |
Authentication | Basic HTTP Auth |
Encryption | HTTPS with certificate can be configured in the administrative web interface Configuration :: Network :: HTTP Configuration |
Methods | GET and POST depending on the resource |
Response content type | application/json |
Wildcard | Asterisk '*' |
The RESTful API access is restricted to username 'admin'
Resources
/hosts
Example | /hosts/{host_name} |
---|---|
Get all hosts | hosts/* |
Get all hosts, filter details for the fields current_state and plugin_output | hosts/*?fields=current_state,plugin_output |
Get onyl the host named 'Google' with all details | hosts/Google |
/services
/problems
Example | /services/{service_name} |
---|---|
Get all problems | problems/* |
Get all problems for service 'Mail_out' | problems/services/Mail_out/hosts/* |
Get all problems of host 'Email_Loop' | problems/services/*/hosts/Email_Loop |
Get detail view for problem of host 'Email_Loop' for service 'Mail_out' | problems/services/Mail_out/hosts/Email_Loop |
Get all problems of host 'Email_Loop' | problems/services/*/hosts/Email_Loop |
Acknowledge host Problem
http://192.168.111.1/v1/*/local/cmd/ACKNOWLEDGE_HOST_PROBLEM/Google/1/1/1/Operator/Aware of this problem, acknowledged
Process Host Check-Result
http://192.168.111.1/v1/*/local/cmd/PROCESS_HOST_CHECK_RESULT/Google/0/OK - Wieder ein Fake|pkt=1;;0;2 rta=20.945;1000.000;2000.000;
Process active Host Check
http://192.168.111.1/v1/*/local/checknow/Google
Services
All services
http://192.168.111.1/v1/*/local/services/*
All services with name ICMP
http://192.168.111.1/v1/*/local/services/ICMP/hosts/*
All services with name ICMP (only fields current_state and plugin_output)
http://192.168.111.1/v1/*/local/services/ICMP/hosts/*?fields=current_state,plugin_output
Service ICMP for host SAP (all available fields - detail view)
http://192.168.111.1/v1/*/local/services/ICMP/hosts/SAP
Services of host EMail_Loop
http://192.168.111.1/v1/*/local/services/*/hosts/Email_Loop
Services of host EMail_Loop (only fields current_state and plugin_output)
http://192.168.111.1/v1/*/local/services/*/hosts/Email_Loop?fields=current_state,plugin_output
Acknowledge service Problem
http://192.168.111.1/v1/*/local/cmd/hosts/PDC/services/LDAP/ACKNOWLEDGE_SVC_PROBLEM/1/1/1/admin/Problem already known
Process Service Check-Result
http://192.168.111.1/v1/*/local/cmd/hosts/Google/services/Sleep60/PROCESS_SERVICE_CHECK_RESULT/0/OK - Example Result|val=10;20;30
Process active Service Check
http://192.168.111.1/v1/*/local/checknow/Google/http
Actions
List available actions
http://192.168.111.1/v1/*/local/actions/*
Display a specific action
http://192.168.111.1/v1/*/local/actions/OpenDoor http://192.168.111.1/v1/*/local/actions/_ArmSite
Execute a specific action
http://192.168.111.1/v1/*/local/actions/OpenDoor/exec
OS Commands
Supported commands:
- ls
- traceroute
- nslookup
- type (display files installed in /mnt/hd/daaz/addons/var an below)
- ping
- check (service/hosts checks available in /sys/daaz/libexec)
- df
- ps (no arguments)
Restrictions
- Only available for user 'admin' - Only callable from within admin GUI (usually port 81) - Valid arguments characters: [a-zA-Z0-9\-\._\/]
Examples
http://192.168.111.1:81/v1/*/local/oscmd/ls/\flash\sysconfig http://192.168.111.1:81/v1/*/local/oscmd/traceroute/www.google.dehttp://192.168.111.1:81/v1/*/local/oscmd/check/nslookup/www.google.de http://192.168.111.1:81/v1/*/local/oscmd/nslookup/www.google.de/195.190.0.2http://192.168.111.1:81/v1/*/local/oscmd/type/\azeti\door_access.policy http://192.168.111.1:81/v1/*/local/oscmd/ping/-c/3/www.google.dehttp://192.168.111.1:81/v1/*/local/oscmd/check/check_icmp/-H/www.google.de http://192.168.111.1:81/v1/*/local/oscmd/check/check_icmp/-H/www.google.de/-vhttp://192.168.111.1:81/v1/*/local/oscmd/check/check_icmp/-H/www.google.de/-v/-v http://192.168.111.1:81/v1/*/local/oscmd/check/check_host/-H/www.google.dehttp://192.168.111.1:81/v1/*/local/oscmd/check/check_host/-H/www.google.de/-v http://192.168.111.1:81/v1/*/local/oscmd/check/check_host/-H/www.google.de/-v/-vhttp://192.168.111.1:81/v1/*/local/oscmd/df http://192.168.111.1:81/v1/*/local/oscmd/ps
AddOns
Upload/Download files to/from /mnt/hd/daaz/addons/var an below:
GET - Download POST - Upload
http://192.168.111.1:81/v1/*/local/addons/var/azeti/door_access.policy