I'm pushing custom metrics to IBM monitoring using the REST API.
That seems to work because querying the data returns it (see below).
However, whatever metric I try to configure in Grafana, the visualization always comes up empty with "no datapoints".
How should I address the custom metric in Grafana?
POST https://metrics.ng.bluemix.net/v1/metrics
[
{
"name":"test_metric",
"value":80,
"timestamp":1541866045
}
]
GET https://metrics.ng.bluemix.net/v1/metrics?target=*&from=1541865900&to=now
[
{
"target": "test_metric",
"datapoints": [
[
100,
1541865930
],
[
30,
1541865960
],
[
30,
1541865990
],
[
80,
1541866020
],
[
null,
1541866050
],
[
null,
1541866080
]
]
}
]
Apparently I had to add the header X-Auth-Scope-Id to make sure that Grafana was looking at the right datasource. Although it's technically an optional header (and stated as optional in the documentation), if you don't specify it then IBM's default settings in its hosted Grafana will not find the data, unless you explicitly change the view to the "account" scope. Thanks to everyone who took at look at this.
Related
To configure the i18n functionality in UI5, I'm using the following snippet in the sap.ui5 of manifest.json:
"models": {
"i18n": {
"preload": true,
"settings": {
"bundleName": "webapp.i18n.i18n",
"bundleUrl": "i18n/i18n.properties",
"fallbackLocale": "en",
"supportedLocales": [
"en"
]
},
"type": "sap.ui.model.resource.ResourceModel"
}
},
Thanks to supportedLocales and fallbackLocale I don't expect that UI5 will request unexisting localizations, but in fact I still observe unwanted 404-requests for i18n_en_US.properties:
GET http://localhost:3000/i18n/i18n_en_US.properties 404 (Not Found)
I assumed that the whole idea behind of supportedLocales and fallbackLocale is to reduce amount of requests of localizations, which don't exist and are not specified in supportedLocales.
My questions:
Why UI5 anyway tries to request i18n_en_US.properties although en_US doesn't appear in a list of supportedLocales?
Is it possible to get rid of extra requests for unsupported locales?
I figured out the reason for the unwanted 404-requests.
Initially, I've defined fallbackLocale and supportedLocales for the sap.ui5/models/i18n section, but there is also an i18n section in sap.app, which also requires fallbackLocale and supportedLocales configuration.
The final solution is to add the following code-snippet into sap.app section of manifest.json:
"i18n": {
"bundleName": "webapp.i18n.i18n",
"fallbackLocale": "en",
"supportedLocales": [
"en"
]
},
When I invoke the skill with 'okay Google, ask {skillname} to {utterance}' I get the response 'The agent returned an empty tts" and the conversation closes. It doesn't even seem to hit my backend - I've tried hosting the backend code on both a local server and on AWS and the same issue happens in both cases. There's no log of the request being made either on Stackdriver on Google or on CloudWatch on AWS. The only response I get is the following in the debug tab:
{
"response": "The agent returned an empty TTS.",
"expectUserResponse": false,
"conversationToken": "EosDS2o4d0...",
"audioResponse": "",
"ssmlMarkList": [],
"debugInfo": {
"sharedDebugInfoList": [
{
"name": "Response Validation",
"debugInfo": "The agent returned an empty TTS.",
"subDebugEntryList": []
}
],
"conversationBuilderExecutionEventsList": []
},
"visualResponse": {
"visualElementsList": [
{
"displayText": {
"content": "The agent returned an empty TTS."
}
}
],
"suggestionsList": [],
"agentLogoUrl": ""
},
"clientError": 0,
"is3pResponse": true,
"clientOperationList": [],
"projectName": "",
"renderedHtml": ""
}
Nothing in any of the other tabs. When I try invoking the phrases in the same way on my phone, I just see a loading symbol and again nothing in the logs to say it's even hitting the backend.
Weirdly, this doesn't happen when I say 'okay Google, talk to {skillname} {utterance}' - this works absolutely fine.
All the intents work perfectly well when I've opened my action first, and then invoke them. I've built this using Jovo and published on Alexa also and the problem is only happening on Google.
I'm at a loss with the documentation here.
I'm trying to create a basic hello world email template, with some simple email substitutions - and I can't work out the syntax.
The documentation here suggests using a -igetreplaced- syntax, and gives the following example:
<html>
<head></head>
<body>
<p>Hello -name-,<br>
Thank you for your interest in our products. I have set up an appointment to call you at -time- EST to discuss your needs in more detail. If you would like to reschedule this call, please visit the following link: `reschedule`
Regards,
-salesContact-
-contactPhoneNumber-<br>
</p>
</body>
</html>
An accompanying SMTP API JSON header might look something like this:
{
"to": [
"example#example.com",
"example#example.com"
],
"sub": {
"-name-": [
"John",
"Jane"
],
"-customerID-": [
"1234",
"5678"
],
"-salesContact-": [
"Jared",
"Ben"
],
"-contactPhoneNumber-": [
"555.555.5555",
"777.777.7777"
],
"-time-": [
"3:00pm",
"5:15pm"
]
}
}
I've tried pasting these in to the template code editor, but it doesn't work.
Can someone point me to the right documentation for getting the syntax correct?
The syntax is Handlebars.
Use it like this:
Hello {{name}}
with data:
{
"name": "Bob"
}
Using PowerShell, how can I query Team Foundation Server 2017 Update 2 (on-premises) to get the code coverage percentage metric from the latest completed gated check-in?
I've not found a clear API call to use in the MS reference documentation. In the web interface, I can see in the dashboard for a given completed build the percentage value and a link to download the entire Visual Studio coverage file. I don't want the file, though. I just want to make an API call and get the percent coverage value for the last successful build of a given definition.
Unfortunately, the docs for VSTS's REST API are down right now, but this should get you started (pulled from Google's Cache).
This endpoint handles everything related to Tests and Code Coverage.
https://{instance}/DefaultCollection/{project}/_apis/test/codeCoverage?api-version={version}[&buildId={int}&flags={int}]
Provide values for the following and then run this Invoke-RestMethod to get the data back.
$Instance = 'fabrikam-fiber-inc.visualstudio.com' #your URL here
$ProjectName = #YourProjectNameHere
$buildID = #YourBuildIDHere
$version = '2.0-preview'
Invoke-RestMethod -uri https://$Instance/DefaultCollection/$ProjectName/_apis/test/codeCoverage?api-version=$version
Here's a sample response you can get back:
Status code: 200
{
"value": [
{
"configuration": {
"id": 51,
"flavor": "Debug",
"platform": "Any CPU",
"uri": "vstfs:///Build/Build/363",
"project": {}
},
"state": "0",
"lastError": "",
"modules": [
{
"blockCount": 2,
"blockData": "Aw==",
"name": "fabrikamunittests.dll",
"signature": "c27c5315-b4ec-3748-9751-2a20280c37d5",
"signatureAge": 1,
"statistics": {
"blocksCovered": 2,
"linesCovered": 4
},
"functions": []
}
],
"codeCoverageFileUrl": "..."
}
],
"count": 1
}
It looks like blocksCovered and livesCovered are probably the closest you'll get from the API. Let me know if you need some help or get stuck. Eventually, the docs will be back online at this URL.
Hi I am trying to reopen (Close to New State) Bug using REST API batch operation in TFS .
My patch document is as below
[
{
"method":"PATCH","uri":"/_apis/wit/workItems/309?api-version=1.0","headers":{
"Content-Type":"application/json-patch+json"
},
"body":
[
{
"op":"add",
"path":"/fields/System.State",
"value":"New"
},
{
"from":"add",
"op":"add",
"path":"/fields/System.Tags",
"value":"abc,cde,efg"
}
]
}
]
I am getting below error,I find not much information in documentations Please be kind enough to help me to rectify this issue.
TF401320: Rule Error for field Resolved Reason. Error code: HasValues, LimitedToValues, SetByRule, InvalidNotEmpty.
p.s : similar method work fine to modify "New" Bug "Close"
You need to clear ResolvedReason field value:
[
{
"op":"add",
"path":"/fields/System.State",
"value":"New"
},
{
"op":"add",
"path":"/fields/Microsoft.VSTS.Common.ResolvedReason",
"value":""
}
]