Status page from prometheus alerts? - grafana

Is there anyway we can create a status page with data from prometheus alerts? Status pages should be something similar to status.io page but the data should be from prometheus.

I tried a lot of tools but couldn't find any which suits my requirements. For anyone looking for a simple solution, the best bet is Prometheus api.
Prometheus api will be like
http://prometheus-weburl/prometheus/api/v1/query?query=ALERTS{alertname="InstanceDown"}
Traversing through the output json for return values can be used to update innerHTML if used with JavaScript.

Related

how to intregrate opsgenie metric whit grafana?

I want to look at the Opsgenie metrics in grafana.
There is currently no native integration.
Being able to show the same metrics that are displayed today in opsgenie directly in grafana.
Does anyone work on this who can guide me on how to approach these solutions?

How to extract view meta data from tableau

I need to extract metadata from view. When I was reading tableau rest API documentation there is no ways mention in the rest api for sheet metadata and also not mention measure and dimension API extraction. If anyone knows the way how to extract data please help me
Take a look at the Tableau Javascript API...specifically the getData method.
The Rest API is used for automating Tableau Server tasks (add users, create schedules, set permissions, etc).
You can embed a hidden extension into your dashboard that can access worksheet, field and filter information. See the docs on extensions here.
Here is a good example of one that could get you started on pulling the worksheet and field information.
Use the Tableau Metadata API - https://help.tableau.com/current/api/metadata_api/en-us/index.html
You can find sample scripts here - https://github.com/tableau/metadata-api-samples

Cakephp 3.1 REST - Filtering data

I have setup my application for REST access as per documentation. The default routes are working well. I am able to retrieve, update and delete records, however, I am not sure how I could filter data sending parameters to the controller. I wonder if I can do that using querystring or if there is a better way to accomplish that. Please can someone give me directions?
Reads about the Request object in the manual. And use the Search Plugin for filtering.
The search plugin comes with a lot of documentation that explains how to use it as well.
Your question is so generic that a proper answer would end up in a whole article - which I'm obviously not going to write, there is enough information available on HTTP requests and query params. Use Google or read these links:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Messages
https://www.w3.org/Protocols/HTTP/Request.html

In Tableau server, how can we get measures and dimensions of a data set using REST API?

I looked at their REST API but I haven't found anything which gives me the measures and dimensions of the dataset/data source. I need to expose what measures and dimensions are there so that user knows what workbooks or visualizations he can create. Any ideas or help is greatly appreciated.
Fields in a datasource are not something that you can query directly via the REST API. My best suggestion, while not perfect, would be to add a tag for each field that you want to be queryable in the datasource, and then use the REST API to query your datasources show what is available to the user.
This shows you how to tag a datasource
Here is the specific REST API command that will return the tags
I want to stress that this isn't a perfect solution, but the REST API has a very WIP feel to it to begin with (REST should be able to do everything that tabcmd can do, but sadly, it can't).
There is also the undocumented REST API that has some additional functionality. That may have more of what you are looking for. I'm not 100% sure that this will solve your problem, but it does provide a lot of additional functionality to the base API.
Undocumented Tableau REST API

how to specify URL in filters pagePath core reporting api V3

I am building a web app that pulls data through the Core Reporting Api v3 from Google. I am using the client PHP library offered by Google.
I am currently trying to specify a page and retrieve its pageviews for a time range. Every other seems to be working okay except for the fact that if a specfy a filter with ga:pagePath==http://link/uri then I get 0 all the time no matter the time range.
I think the problem is got to do with the setting of value for this pagePath. I want to have spearate data for the desktop version of the site and the smartphone version denoted by s. subdomain
Can anyone hint me on some tips and or tricks to use to get the required data?
Example URL:
http://domain.com/user/profile/id/1
http://s.domain.com/user/profile/id/1
Thanks in advance!
for the the default implementation of Google Analytics, ga:pagePath doesn't include the scheme or hostname so in your case you'd actually want to filter using ga:hostname and ga:pagePath together.
I suggest you use the Query Explorer to build your queries and get familiar with what will work. You can also use this tool to at least get a sense for what type of data the ga:pagePath and ga:hostname dimensions return before trying to filter on them. Finally, once you have the query you want, you can easily get the exact Core Reporting API query by clicking on the Query URI button.
Also check out the Combining Filters section of GA API docs.
So if you want filter on ga:pagepath for domain.com and s.domain.com separately you could do something like
filters=ga:pagePath==/user/profile/id/1;ga:hostname==domain.com
filters=ga:pagePath==/user/profile/id/1;ga:hostname==s.domain.com