Solace queue monitoring in splunk
Hi Team,
We are trying to integrate solace with splunk via API's,
We want to monitor for example queue size, how many messages are there in queue but unfortunately we are unable to figure out the rest api urls to monitor.
Could anyone help me out with API's
Comments
-
The values that you are interested in are msgSpoolUsage
and msgs count. To see the value for currently spooled messages, you can run
the following command:
curl -X GET --user admin:admin
"[1]http://xx.yy.zz.ss:8080/SEMP/v2/monitor/msgVpns//queues?count=25&select=queueName,msgs.count,msgSpoolUsage" -H
"content-type: application/json"Regarding the output of the number of queues, SEMP will limit the number of
objects returned in the response to 10 by default. If you are retrieving a
large number of objects, it is suggested that you use paging to retrieve a
subset of the information at a time. For details, please refer to the
documentation found here in the paging section
[2]https://docs.solace.com/SEMP/SEMP-API-Archit.htm#Paginati and here in the
cursor section
[3]https://docs.solace.com/API-Developer-Online-Ref-Documentation/swagger-ui/monitor/index.html.
While paging is the recommended approach for performance reasons, for a
smaller number of objects but greater than 10, it is possible to increase the
count of objects retrieved by using the `count' query parameter as I have
shown in the above command. Please refer to the count section in the
documentation regarding this feature:
[4]https://docs.solace.com/API-Developer-Online-Ref-Documentation/swagger-ui/monitor/index.html2 -
You may call configure Splunk to call these API's periodically against an index to further analyse it,
0 -
Hey @shaikhussain - you might find this helpful, we have a Solace Community Github org and one project is a Solace Prometheus Exporter which leverages SEMP APIs to extract metrics and export them in a prometheus friendly API for metrics consumption. There is also another utility SolCharts that has a similar idea. Check them out; hopefully it'll give you some ideas! And feel free to contribute to those github projects (and star the repos!)
1 -
@Tamimi thanks , this helped me a lot,
But i was wonder why i am unable to see stats information in my results while running the https://myhost:943/SEMP/v2/monitor/msgVpns/myvpn , https://myhost:943/SEMP/v2/monitor/msgVpns/myvpn/queues and the main field "subscription" info.0 -
@alamkhan786 said:
The values that you are interested in are msgSpoolUsage
and msgs count. To see the value for currently spooled messages, you can run
the following command:
curl -X GET --user admin:admin
"[1]http://xx.yy.zz.ss:8080/SEMP/v2/monitor/msgVpns//queues?count=25&select=queueName,msgs.count,msgSpoolUsage" -H
"content-type: application/json"Regarding the output of the number of queues, SEMP will limit the number of
objects returned in the response to 10 by default. If you are retrieving a
large number of objects, it is suggested that you use paging to retrieve a
subset of the information at a time. For details, please refer to the
documentation found here in the paging section
[2]https://docs.solace.com/SEMP/SEMP-API-Archit.htm#Paginati and here in the
cursor section
[3]https://docs.solace.com/API-Developer-Online-Ref-Documentation/swagger-ui/monitor/index.html.
While paging is the recommended approach for performance reasons, for a
smaller number of objects but greater than 10, it is possible to increase the
count of objects retrieved by using the `count' query parameter as I have
shown in the above command. Please refer to the count section in the
documentation regarding this feature:
[4]https://docs.solace.com/API-Developer-Online-Ref-Documentation/swagger-ui/monitor/index.html@alamkhan786 thanks a lot sir , i can able to create my own api's now but unable to fetch the stats information my result "https://myhost:943/SEMP/v2/monitor/msgVpns/myvpn"
0 -
@shaikhussain
I would suggest to use syslog integration if you want to monitor Solace only via Splunk. Solace appliances support syslog configuration to forward all logs (command, event, system) into separate LINUX server and then install the splunk forwarder to feed the logs into Splunk servers. You can check this --> https://github.com/aaron-613/solace-logging-config0