Using template variable in Datadog SLO widget - monitoring

I have one Datadig dashboard to monitor a particular service. To use the same dashboard for other services, I added a couple of template variables to change the queries in the dashboard. But, I could not use these variables in the query section of Datadog SLO widget.
The following query with variables works in the other type of widgets, but not in the SLO widget.
sum:aws.applicationelb.httpcode_target_2xx{$environment,$service}.as_count()
Is there a way to use variables in SLO widget too, or not possible because it is in beta version or something?

Related

Amazon Connect Contact Flow CLI/API

So I am looking at how I can use the new CLI/API features to a pipeline so that a Contact Flow in Dev can be deployed to Testing and then onto Prod.
But I have found the format of the CLI/API 'content' attribute expects a different JSON format to that of the export/import feature within the UI.
Has anyone tried this and got it working?
So the export/import format of the JSON is different from the UI so you cannot use the AWS CLI/ Connect API to import the file.
So you need to use the describe-contact-flow CLI/API to get the correctly formatted JSON and then use the create/update contact flow CLI/API for it to work. It will not work by using the UI Import facility.
I suggest waiting for the next release, Amazon has inferred this the first of many changes that they are deploying for DevOps around Contact Flows.

How can I provide different fulfillment URLs for Actions on Google Release?

The documentation at https://developers.google.com/actions/deploy/release-environments states "To handle release channels in your fulfillment, you should provide different fulfillment URLs (for example, one fulfillment URL for the beta and another URL for the production version of your Action)." However, there are no instructions on how this should be accomplished.
When I created my Actions on Google project, a Firebase project was created to which I upload JavaScript that supports those actions via requests to our backend service. That Firebase project provides the URL used by my Beta release for fulfillment. I now need to create an Alpha project that points to a different Firebase project to which I will upload new versions of support for requests to different versions of our backend service. I do not see a way to accomplish this. Do I need to create an entirely new Actions on Google project that has its own URL for fulfillment or is there some better way to accomplish this task?
I tried creating manually creating a separate Firebase project to host the Alpha code but that did not work. I later learned that when you create a Actions on Google project that it is intimately connected to the Firebase project created for it and cannot be pointed to another.
The problem is all in the configuration space of Actions on Google and Firebase. There is no code to show.
I would expect that some approach similar to that provided by the Alexa Developer Console and the Amazon Lambda Management Console would be available. In that approach, I have Alpha, Beta, and Production versions of the Alexa Skill and each of them points to a different version of the lambda function each of which has an appropriate value to indicate the environment that the lambda function is executing upon. This allows me to allocate requests to the correct backend service (alpha, beta, production).
I don't see a way to accomplish that in the Actions on Google/Firebase world.
If you are using Dialogflow, the Actions on Google release levels have corresponding environments. So you should be able to set a different fulfillment URL for each environment to point at the different project.

How to create a microservice that replicates itself as load of data increases?

Iam working on a project of big data, where Iam trying to get tweets from Twitter and analyse these tweets and make predictions out of it.
I have followed this tutorial : http://blog.cloudera.com/blog/2012/10/analyzing-twitter-data-with-hadoop-part-2-gathering-data-with-flume/
for getting the tweets. Now Iam planning to build a microservice which can replicate itself as I increase the number of topics on which I want tweets. Now whatever code I have written to gather the tweets with that I want to make a microservice that can take a keyword and create a instance of that code for that keyword and gather tweets, for each keyword an instance should be created.
It will also be helpful if you inform me what tools to use for such application.
Thank you.
I want to make a microservice that can take a keyword and create a instance of that code for that keyword and gather tweets, for each keyword an instance should be created.
You could use kubernetes as an underlying cluster/deployment infrastructure. It has an API that allows you to deploy new services programmatically. So what you would have to do is:
Set up a basic service container for your twitter-service that is available in a container repository.
Then you deploy a first service based on your container. The service configuration will contain the keyword that the service uses as well as information about the kubernetes cluster (how to access the cluster API and where to find the container in the repository).
Now your first service has all the information it needs to automatically create additional service descriptions for kubernetes (with other key words) and deploy those additional services by calling the kubernetes cluster API.
Since the additional services will be passed all the necessary information as well, they themselves can then start even more services and so on.
You probably need to put some effort into figuring out the cluster provisioning, but that can also be done automatically with auto-scaling (available for Google or AWS clouds for example).
A different approach would be to run a horizontally scaled cluster of your basic twitter services that use a self organization algorithm to involve all the keywords put into a database or event queue.

Third-party services integration with Jira through REST API

I’m trying to integrate a third-party tool with Jira server via REST API.
Currently we have a customized Jira used by our client with a business specific issue types.
Basically all I need is to be able to create an issue of a given type, get response (success/error) and get metadata (list of required and optional fields) for that tool via REST API.
We have a create issue page on WebUI, where user can submit his request.
But the problem is all validation logic is “smashed” between some Javascript code, Behaviours and SIL Programs Manager add-ons, AJS scripts, Jira native fields configuration etc.
So I can’t use “plain” Jira REST API directly because it creates issues without taking in account business rules of a given issue type - e.g. requires fields, one fields can have values depending on another field’s value, an attachment is a required as part of an issue etc.
My question is what is the best way to make an integration with Jira.
I want to be sure if someone will try to create an issue via REST API, the data is consistent according to the issue business rules.
I was thinking to write some "proxy" REST API, which will do the all validation needed and create (or edit) / reject the request.
We've developed a separate Jira plugin which serves some scenarios. So, I can add those API to the plugin.
Or, use Jira REST API endpoints like POST /issue (and PUT /issue/), and I have to define a new screen for it, set all required fields via standard Jira settings, set Cascading fields rules and the standard validator will check if everything is ok out-of-the box?
Sorry, I’m new to Jira and not sure if my current understanding is correct now.
Thanks
Tricky. Best to validate the data in a single place (with one set of code) before calling the create REST API. That way you can also modify the validation logic more easily over time. I think I would probably define a new REST endpoint. ScriptRunner lets you script that nowadays

cloud foundry is providing same instance of my web page to every device

Lets say there is some static variables in a class and when user on device 1 store some data on it and at the same time some other user on device 2 open the web page then he/she also gets the same data store in that variable,,insted of the deafult data i store .
I think cloud Foundry provide different isolated environment to every user that goes on the website but in that case that is not happening.
Please do tell if this the same behavior what cloud foundry really provide or i am missing something .
cloud Foundry provide different isolated environment to every user that goes on the website
That statement is absolutely not true. Each instance of an application does get an isolated execution environment, but CF creates exactly as many application instances as you tell it to (e.g. via the -i parameter on cf push or cf scale). The platform does not scale up instances per user. No platform I know of does that, as it would be incredibly inefficient.
If your web application needs to keep unique data for each user of the app, it will need to implement session management logic inside the app. You can't do this with static fields in classes. Exactly how you implement session management is dependent on the language and frameworks you are using.

Resources