I have a script that running via exec input plugin of fluent bit.
I want to add custom metrics from the script execution to the original /api/v1/metrics/prometheus API.
What I need to add to my script in order to publish custom metrics ?
Related
I am trying to configure event arc using node.js code. any idea on how Event-Arc configuration can be done with node.js.
Because there is a lot of lacking information in your question I will have to do some assumptions.
If you want to set up Eventarc, there is a client library for NodeJS available here.
Depending on your use case you either want to read about
Triggers that are listening for Google source (docs)
Third party integrations (docs)
Custom events integration via Firebase (docs)
I have a project in GCP with some internal APIs (in VMs), Databases, and so on.
Now, I'm trying to create a GAS to obtain data from one of those internal APIs (Druid, in my case) to print some data in a Google Spreadsheet.
My point here is that I link the GAS to my GCP project, expecting to be able to connect to my internal IP (10.1.0.x) which is in a VPC, shared with the default one. So, if I start a new VM attached to the default network, I could be able to ping and connect to it. Seems reasonable.
But, when I execute the GAS function, the following pice of code fails: UrlFetchApp.fetch('http://10.1.0.3:8082/druid/v2/?pretty', options);.
Should I configure something else in the GCP project to be able to connect to internal APIs?
Should I change the way and use another GCP service to do so?
Any help would be more than appreciated!
Thanks
That is not supported in Apps Script. You could request a feature request in the bug tracker. See https://developers.google.com/apps-script/support#missing_features
Internal APIs run client-side and need to be incorporated within JavaScript code.
Within Apps Script you can run JavaScript code, if you deploy your project as a Web App.
You can then either embed the JS code within the HTML file attached to the project, or directly insert it within the <script></script> tags within HtmlService.createHtmlOutput().
I am working in a dialogflow agent and I had Cloud Functions for Firebase enabled and handling my my intents previously. I disabled them on this agent because I was unable to enable them on another agent and I wanted to see if it was a permission issue or something differing between agents. Now, once disabling Cloud Functions on the previously working agent I cannot re-enable Cloud Functions on that agent so I am locked out of doing any sort work fulfilled by Cloud Functions.
In the console I am flipping the switch from DISABLED to ENABLED and the UI changes showing that it should be enabled. Like this:
I notice here that there is no Save or Deploy button. Not sure if that is an issue, but when I click on Intents in the side bar and then click back on Fulfillment the screen looks like this again where Cloud Functions are disabled:
The fact that I am unable to enable Cloud Functions is further confirmed by the fact that the last logs I had in Cloud Functions is from a few days ago when I made the mistake of disabling Cloud Functions fulfillment.
I hope I'm missing something simple here, but I can't find anything (yet) in the dialogflow documentation that tells of anything that I'm missing. I'm kind of at a loss since it was working before and now I can't seem to turn it back on.
Any help would be much appreciated. Thanks!
You should navigate to your firebase console, choose the project, click on the left menu on develop > functions, then on the three dots on the right you can delete your function.
You then, go back to your Dialogflow console and select the inline editor toggle, in case it does not work right away, try refreshing the page.
That error message seems related to a Dialogflow's limitation in fulfillment. Once you modify your code outside the Inline Editor, you cannot go back to use it, so you have to use your code editor from now on and deploy your functions using Firebase CLI. You can check all the limitations here.
Unfortunately, as I myself also lost my ability to use the fast dialogflow inline editor,
"If you modify your function outside of inline code editor, you can no longer use the editor to modify your Cloud Function for Firebase. Your function will continue to provide fulfillment for your agent, but if you need to make changes, you will need to do so in the Firebase console."
As of today this is a known limitation of dialogflow (see Dialog Flow Fulfillment Limitations)
To run the cloud function after getting edited from the inline editor, you have to give your firebase function link to webhook.
Enable webhook service there and give the link of your cloud function and it will work as you expected.
I am trying to get the api explorer for the function firebasedynamiclinks.getLinkStats
After logging in for Oauth and executing the request I get the following error message.
Firebase Dynamic Links API has not been used in project
before or it is disabled. Enable it by visiting
https://console.developers.google.com/apis/api/firebasedynamiclinks.googleapis.com/overview?project=%ProjectId%
then retry. If you enabled this API recently, wait a few minutes for
the action to propagate to our systems and retry.
Following the link with the provided %ProjectId% from the original error takes me to a page that gives me the following error:
The API "firebasedynamiclinks.googleapis.com" doesn't exist or you
don't have permission to access it
It seems strange that I have the ability to generate dynamic links and do so manually just fine. I don't know which project I need to enable the dynamic links api for as I have enabled it for the Google Scripts project that I am using it in.
How can I get access to manually created dynamic link analytics?
I'm aware there is Web API allowing this trick using current build number. But it requires authentication thus script must be edited on each hudson.
Is there a way to achieve that from script or through plugin?
If you're talking about setting the description of a build, Jenkins can do this, based on a regular expression in the build output.
See the Description Setter Plugin.