I want filter my hosts in a query. To do that according to the docs I can use text* like :
q("sum:app.call{host=vpcolt*}", "1m", ""))
But in my case, scollector send metrics directly in OpenTSDB. So Bosun doesn't seem to have informations about hosts because * does not incur any additional OpenTSDB API requests.
If I have not wrong, how can I handle this ?
If you are/can use OpenTSDB 2.2, enable it in Bosun's config:
tsdbVersion = 2.2
then you can use the new filter syntax:
q("sum:app.call{host=iwildcard(vpcolt*)}", "1m", ""))
it should work this way, even if Bosun doesn't receive data.
Related
I have a logs endpoint rest url that I want to call and get the contents by calling a function. In a simplified way, create function like below.
create function getData(url:string)
{
let data = curl GET url;
print data
}
//Call it.
getData("<some rest url here>")
The documentation from Microsoft seems to talk about Kusto's own APIs not not how to call an external API. Am I missing something?
The documentation you reference relates to calling Kusto service REST APIs.
Kusto query language is a query language, not a open-ended programming platform.
Call-outs to external sources such as SQL Azure are possible, but subject to certain restrictions, primarily security-oriented by nature.
See external data operator, sql_request plugin, and callout policy articles.
My system contain:
- Freeswitch server
- Sip Client: Web using sipjs , mobile react-native using https://github.com/datso/react-native-pjsip to receive call.
My problem is when call done i need to know the uuid of CDR recently add to Postgres DB of that call to attach some info to that call
I try many way but can not success ex: write http request to select into postgres DB, but can not find exactly which uuid because one extension can make many call one time.
Can anyone help me solve this case?
Mark each call with custom variable like callid
Send that to your app via any method, as sipheader, as sip message, using http post etc.
But you also can just search cdr by start date.
I need an alerting system where I could have my own metric and threshold to report for anomalies (basically alerting on the basis of logs and data in DB). I explored Bosun but not sure how to make it work. I have following issues:-
There are pre-defined items which are all system level, but I couldn't find a way to add new items, i.e. custom items
How will bosun ingest data other than scollector. As I understand could I use logstash as data source and totally miss OpenTDSP( Really don't like HBase dependency)?
By Items I think you mean metrics. Bosun learns about metrics, and their tag relationships when you do one of the following:
Relay opentsdb data through Bosun (http://bosun.org/api#sending-data)
Get copies of metrics sent to the api/index route http://bosun.org/api#apiindex
There are also metadata routes, which tell bosun about the metric, such as counter/gauge, unit, and description.
The logstash datasource will be deprecated in favor of an elastic datasource in the coming 0.5.0 release. But it is replaced by an elastic one is better (but requires ES 2+). To use those expressions see the raw documentation (bosun.org docs will updated next release): https://raw.githubusercontent.com/bosun-monitor/bosun/master/docs/expressions.md. To add it you would have something like the following in the config:
elasticHosts=http://ny-lselastic01.ds.stackexchange.com:9200,http://ny-lselastic02.ds.stackexchange.com:9200,http://ny-lselastic03.ds.stackexchange.com:9200
The functions to query various backends are only loaded into the expression library when the backend is configured.
How to delete metrics in Opentsdb using HTTP API based on given time period.
http query and metric name
edit /etc/opentsdb/opentsdb.conf file
add below property to enable deletion
tsd.http.query.allow_delete=true
then restart opentsdb.
try below sample query to delete data ,
select http DELETE method in rest client.
http://host:4242/api/query?start=2016/02/16-00:00:00&end=2016/02/17-23:59:59&m=avg:1m-avg:metricname
We are seeking the most simple way for sending alfresco's audit log to elasticsearch.
I think using the alfresco supplying query and getting audit log would be most simple way.(since audit log data is hardly watchable on db)
And this query processes the effect measure as json type then I'd like to download the query direct using fluentd and send to elasticsearch.
I roughly understood that it would ouput at elasticsearc but I wonder whether I can download 'curl commend' using query direct at fluentd.
Otherwise, if you have other simple idea to get alfresco's audit log then kindly let me know.
I am not sure weather I understood it fully or not but based on your last statement I am giving this answer.
To retrieve audit entries from alfresco repository you could directly use REST APIs of Alfresco which allows you to access them.