Zabbix & Teltonika SMS Gateway - zabbix

I would like to utilise the Teltonika SMS Gateway in Zabbix to send SMS. The format is the following:
http://10.3.1.7/cgi-bin/sms_send?username=user1&password=user_pass&number=0037060000001&text=testmessage
I understand how to pass the variables into the script, but i'm a little unsure writing the script. Happy to be pointed in the direction where i can research to solve the issue and not just have the anwser.

You can refer to the webhook documentation: define the url and the params, then you can use them in the javascript call.
A simple example can be found here

Related

can i set up a google sheet to receive data from an external webhook/PUSH API

i'm keen to understand if i can use a google sheet / script to receive incoming data from an external (3rd party / non google) webhook.
the webhook requirements:
a defined / expected method from POST (my preferred), PUT, PATCH
an endpoint to post to which, if this is possible, i assume would be something like https://docs.google.com/spreadsheets/d/[sheet_id]/[service_name] or even https://script.google.com/d/[project_id]/[service_name] where ScriptApp can perform handling of the data
method of authentication; the current options available from the sending system are "none" or "oauth"
incoming content; the body is a simple { "id": integer }
oauth inputs include authentication_url, azure_subscription_key, app_key, app_secret, resource_id.
hopefully this is enough information to determine if this is possible. if not then please comment with questions and i'll do my best to answer them. thanks in advance :)
Short answer: Yes, for the most part.
Explanation -
...receive incoming data from an external (3rd party / non google) webhook.
Google Apps Script (GAS) provides a format called as Web Apps where, you write a script to handle incoming requests and "deploy" the Apps Script itself as a web app. In doing so, GAS provides you with it's own endpoint.
Adding this as a point of clarification where the endpoint/URL would not be that of a 3rd party, but that of GAS itself, which will need to be used in a 3rd party's application where they require you to provide an endpoint :)
You only have GET & POST requests (as of now) that can be handled by Apps Script's Web App and not the others that you've stated.
The non-dev, prod-ready link would look something like this - https://script.google.com/macros/s/Unique-Script-ID-Goes-Here/exec
The available auth/permission settings are described here.
The request parameters also describes the format of data that can be processed by the Web App.
Hope this helps but please feel free to ask for any clarifications too, as required.

Using a cloud function with Pub/Sub

I created a simple cloud function from a template and it got assigned a url as a trigger https://us-central1-myapp-dev.cloudfunctions.net/naguib-testing
Then I created a Pub/Sub Topic and tried to subscribe that url to it but I got an INVALID_ARGUMENT error appear on the console screen.
I went through a similar SO question where the solution is to verify that I own the domain I am trying to connect to, but I don't own cloudfunctions.net :/
I can't understand how that's not supposed to work or what should I be doing?
Cloud Functions can be created as HTTP functions (as you did) or as Background functions. The latter is automatically invoked via a message on a Google Cloud Pub/Sub topic for example. I believe this is exactly what you'd need here.
However, if for some reason you do prefer to use your HTTP function as Pub/Sub push endpoint, you may be interested in this SO answer, where the site verification is done via an HTML tag.

Integrate sonarcloud with slack channel

I'm trying to integrate sonarcloud (not sonarqube) with a Slack channel. I want to have the same behaviour in Slack that the one we have in Github or Travis integration: I mean a push notification on a channel.
In Slack exists the option of a webhook but it's limited because only accepts an input format:
{
"text": "message"
}
On the other side, on sonarcloud, there is the possibility to send a POST message to a webhook, but doesn't exist the chance to choose the format of the message, because it's predefined. Has someone any idea about how to connect these two services?
I have thought to use a AWS lambda in order to adapt the message as a bridge but i'm looking for simpler ideas which do not require more infrastructure.
I've used email notifications from sonar cloud and added Zapier "Gmail-Slack" integration for emails with a specific filter. A bit hacky but it works well.
A little late, but for people who might be looking for the answer on this one. I didn't integrate SonarCloud with Slack (yet), but I've had success integrating both CircleCI and SonarCloud with GeckoBoard using zapier which is an online service. It can accept a webhook and then allows you to connect it to a different service (ie, Geckoboard or Slack) by selecting and modifying values in that webhook before sending it on in the correct format. Quite easy to do as well; no programming and no servers to maintain. Hope this helps.

ClojureScript Exponent - Get Data From an API

What is the best way of getting information from an API?
In ClojureScript you can use Ajax GET requests to connect to an API.
For my exponent app, I want to have a button that when pressed, it connects to a website, say Google (doesn't have to be, just an example), and then simply returns the data.
I also need authentication for these requests so how would I add that as well?
In react native you can use fetch, how would I use this in ClojureScript?
Any help would be much appreciated. Thanks.
Actually it's really super simple.
(js/fetch your-arguments)
Just remember that you can get acces to js functions via js/. And don't forget to pass js data-structures to function. I'm talking about clj->js function.

is there a simple example how to send emails using Tornado?

sorry for this question,
i just need a simple example to understand how SMTP works with Tornado;
What do i need, if i've a simple application, then do i need to open a new account on Gmail or Yahoo?
Tornado doesn't provide anything to handle SMTP.
You can use smtplib, although it's synchronous. Check out the example given.