viewing data stored in OpenTSDB - database

I have been working on OpenTSDB from past one month. I was able to create metrics and store data in the metrics. What I would like to know is..does openTSDB provide any means to view the data stored for a particular metric. Let us say I have created a metric named "EmployeeDetails" and this metric contains details of 2 employees. Now how to view those two employee details...Can anyone suggest me?
Regards
VHC

You can use the default web interface at http://<opentsdb-host>:<port-default-4242> and query for the time series by providing the metric name, time frame and a set of tags to filter on.
Here are alternatives https://github.com/OpenTSDB/opentsdb/wiki/Alternative-front-ends
And not to mention, you can of course use OpenTSDB APIs to retrieve time series data in JSON - http://opentsdb.net/docs/build/html/api_http/query/index.html

You can able to view the TSDB Data in HTTP API:
Using any Rest API CLient like postman or any,
API QUERY:
http://localhost:port/api/query?start=&m=sum:EmployeeDetails
For more details about REST API below.,
http://opentsdb.net/docs/build/html/api_http/index.html
Hope this really helpful for you

Related

How to make a query in MongoDB from query parameters to attachments?

A request for a list of products comes to my server. When I needed to do filtering, I ran into a problem that I couldn’t pass information from the http request to the find method so that it would return information from the nested object as well.
The database structure is like this:
enter image description here
I get the number of records and the page by query parameters. Maybe use json somehow? The experience is very small... I would be glad for any advice. You can also transfer the structure to the database and get rid of nesting, but you really don’t want to.

How to query data from different types of databases in a microservice based architecture?

We are a using a micro-service based pattern for our project where we have Users and their Orders. Users personal information (name, email, mobile) is stored in User table in relational database while we are storing Orders data of users in Orders collection in NoSql database. We want to develop an API to get a paginated list of all the orders placed with order details along with finer details of user associated like - user name, mobile, email along with each order. We are storing userId in Orders collection.
The problem is how do we get User details for each order in this list since both the resources are in different databases. We also thought of storing user name, email and mobile in Orders collection only but what if a user updates their profile, the Orders collection will have stale user data.
What is the best approach to address this issue?
You can use API gateway pattern, UI will call to API gateway endpoint and the Endpoint will call the both the API/services to get the result and aggregate it then returns aggregated response to the UI (caller)
https://microservices.io/patterns/apigateway.html
Well it mostly depends on scalability needs in terms of data size and number of requests. You may go with the API gateway if you don't have too much data and you don't get many requests to that service.
Otherwise if you really need something scalable then you should implement your own thought with an event based communication.
I already provided an answer for a similar situation you can take a look
https://stackoverflow.com/a/63957775/3719412
You have two services Orders and Users. You are requesting Orders service to get all Orders. It will return a response data which will contains ID of Users (each Order contains ID of User). Then, you will make a request to a Users service to get an information regarding User by ID which you got before. And finally, you can aggregate those results (if it is needed).
As guys mention, good solution will be to implement API Gateway here. As a client, you will send a request to a single port with endpoint (to a Gateway) and Gateway should create logic which I have described before.

Profile Photo for mutliple users from Azure AD

I am executing a search operation for people search using Microsoft Graph Endpoint - https://graph.microsoft.com/V1.0/users.
The question I have is - I am able to get all the textual data I need, but is there a way to get photo for each returned user in a single call?. If there are 10 users returned in the previous search, executing 10 different operations to get the photos based on each user's id would be a challenge.
It isn't possible to fetch both user's data and photo in a single call since they are different data types (application/json vs image/jpeg).
Marc is spot on here. However you should also check out the new batching feature (note this is still in /beta) which would allow you to get up to 5 photos in one request round-trip. See https://developer.microsoft.com/en-us/graph/docs/concepts/json_batching. We'd love to get your feedback on this.

The suitable way to import data to CRM ( Smartsheet) from website?

I'm doing wordpress website. And what i wanna do is: when user send contact form ( include their information) or user register, their information is added to CRM directly.
What i wonder is :
1) I should write my own plugin to do these things? possible? Because I think it will get the problem of permission ( when access to CRM)
2) There is a contact plugin which data is saved to database. Can we do cron tab to add data every period of time?
Can I ask you guy:
Are 2 above ways possible?
Are there any easier and possible way to do?
Really appreciate your help.
It's quite possible for Smartsheet to receive such information through the Smartsheet API. To help you get started with connecting to the API with PHP, and sending data to your sheet, I recommend looking at the Smartsheet Platform PHP Samples.
For your particular situation I would look at the Sheet Structure sample.

How to I access reports programmatically in SalesForce using Apex

I'm trying to write an app on the SalesForce platform that can pull a list of contacts from a report and send them to a web service (say to send them an email or SMS)
The only way I can seem to find to do this is to add the report results to a newly created campaign, and then access that campaign. This seems like the long way around.
Every post I read online says you can't access the reports through Apex, however most or all of these posts were written before Version 20 of the API was released last month, which introduced a new report object. I can now programmatically access info about a report (Such as the date last run etc) but I still can't seem to find a way to access the result data contained in that report.
Does anyone know if there's a way to do that?
After much research into it, I've discovered the only way to do this at the moment is indeed to scrape the CSV document. I would guess that Conga etc are using exactly this method.
We've been doing this for a while now, and it works. The only caveats are:
Salesforce username / password /
security token has to be shared to
the app connecting. If the password
changes (and by default it is changed
every 30 days or so) the token also
changes and must be re-entered.
You have to know the host of the account, which can be difficult to
get right. For instance while most european accounts would use emea.salesforce.com to access CSV, our account uses na7 (North America 7) even though we're located in
ireland. I'm currently sending the page host to the app and parsing it
to calculate the correct subdomain to use, but I think there has to be a
better way to do this.
Salesforce really needs to sort this out by supplying an API call which allows custom report results to be exported on the fly and allowing us to use OAuth to connect to it. But of course, this is unlikely to happen.
In the SalesforceSpring 11 update, it seems you can obtain more informations about the Reports:
As stated in the API for Report and ReportType, you can access via Apex the fields used in the query by the Report, reading the field "columns", as well as the field used to represent the filters called "filter".
Iterating through this objects, should allow you to build a String representing the same query of the Report. After building that string you can make a dynamic query with a Database.query(..) call.
It seems to be a little messy, but should work.. (NOT TESTED YET!)
As header states, this works only with Custom Reports!
Just to clarify for fellow rookies who will find this, when the question was asked you could access your report data programatically, but you had to use some hacky, error prone methods.
This is all fixed, you can now access your reports via the API as of Winter '14.
Documentation here - http://www.salesforce.com/us/developer/docs/api_analytics/index.htm
Go to town on those custom dashboards etc. Cross posted from the Salesforce Stack Exchange - https://salesforce.stackexchange.com/questions/337/can-report-data-be-accessed-programatically/
But Conga (appextremes) do this in their QuickMerge product, where the user specifies the report Id, and the apex script on the page runs the report to extract the results for a mail merge operation.
the v20.0 API added metadata about the reports, but no way to actually run the report and obtain the results. If this is a standard report, or a report you've defined, you can work out the equivalent SOQL query for your report and run that, but if its an end user defined report, there's no way to do this.

Resources