How to get notification when node auto scale happens in GKE - docker

I want to get a slack notification or any type of notification when node auto scaler scale nodes in my GKE cluster.
Is there any possible way to implement anything in GCP to get a notification ?

Many depends on what type of Monitoring are you using in your cluster.
If you are using 3rd party software like Prometheus, or Grafana, on Market Place you can find ready images of Prometheus Alertmanager or Prometheus & Grafana where you can configure many notification options.
If you would like to use Google Cloud Monitoring you can specify which notification channel you would like to use. Types are mentioned in Managing notification channels (email, sms, slack, etc).
Please check documentation regarding Alerting behavior for more information.
However if you would like to get events, you can check them in Cloud Logging. It's well described in this docs.

Related

how i can subscribe to topics in azure iot hub device to device communication

I set up an architect for my solution think that iot hub does the work of an mqtt broker, but when I started the implementation , I found that you cannot subscribe to a specific subject to retrieve messages published by another mqtt client, the notion of topic does not exist on iot hub.
I have read several articles about this subject but I have not found an appropriate alternative.
Iot hub has only two topics, and event hub endpoints are limited to 10 endpoints
Can you guide me or suggest a solution with a broker?
How can I subscribe to a specific topic?
I want a device to device communication with pub / sub
Example: a device publishes on a topic / home / room
another device subscribes to / home / room
using iot hub
I am open to all proposals
Thank you
Cloud development
IoT Hub has a limited MQTT broker implementation, because of that, you can't subscribe to device topics from other devices. You could use an Azure Function to catch all your messages and decide if it needs to send a Cloud to Device message. You could also leverage Stream Analytics to decide if a message needs to be sent before talking to that Function. This is probably your best bet if you want to play by Azure IoT Stack's rules.
No cloud development
If you really want your devices to listen to each other, there is an old blog post that describes a scenario where a device uses the service SDK to listen to messages sent to IoT Hub by a different device. It lists the pros and cons in the post.
Custom edge module
If your devices are on the same network, you could build an Edge Module that implements an MQTT broker. The devices would then connect to the edge device as they would in a normal gateway scenario, but also to your custom broker. In your routing, you would then send all the messages to your custom broker to be transmitted to any devices listening to that topic, while still sending the data to the cloud. I imagine their are a few security risks you want to look into if you go in this direction.
So in short: it's possible, probably in many other ways, but in the end you are leveraging a cloud platform that doesn't support this natively.

Google IOT device on webhooks & post

Is there any way to create your own google IOT device based on webhooks and POST-request? Without using firebase, IFTT, node.js
Samples that Google are very poor, they don`t show all steps of creating your own app, they just showing how to deploy "their sample"
I tried to make action with dialogflow & webhook, it was pretty simple. Just processed JSON in POST request to Azure function.
But when I try to create IOT device, its ask me for fulfilment url and it does not even tries to reach that address. I read about action.device.sync, action.device.execute, it just does not communicate with the specified address, giving simulator some voice command doesn`t affect at all. Are there any ways to create IOT device to work with POST-requests & web-hooks?
The answer is it depends.
There are many different ways to do server-device communication: web sockets, local servers, hub/local control, polling, MQTT, and likely many others. All of these solutions have trade-offs, and work in particular circumstances. Depending on exactly what IoT device you want to build, its requirements and technical specs, and what cloud providers you are using, you may identify what works best.
If you run the sample, you'll see it is sending JSON requests to a server and expect JSON responses back. This is must like Dialogflow & a webhook. In this case, the smart home platform communicates solely with the server.
Your server can then communicate with the device in any way that you want. I'm not too familiar with Azure offerings. It might have an MQTT service as well, or some other sort of push notification service you might be able to use.
If you're seeing simulator issues, you may need to make sure your authentication is set up correctly, and you'll need to first complete account linking on your phone before you can use the simulator.

Google IOT - device subscribe to something else than /devices/XXXX/config

I am trying Google IOT and Google PubSub.
I am sending MQTT messages from device to a pubsub queue on which I have subribed (with something I will call "the server").
From the google cloud console, I update device setting and I get the setting message in device.
Everything in google tutorial work fine but I wonder if it is possible to set up a messaging it the other way : i.e. "the server" sending message to a pubsub queue subscribed by the device using MQTT.
The schema at the end of this page make me think that only the "config" mqtt queue (/devices/XXXX/config) can be used that way.
What I need is a 1to1 communication from "the server" to "the device" and I'm afraid that the only way is using the config
I am not an expert on Google IoT, but few days ago I got the same doubts about it. Apparently, although we can publish to /events, /config and /state topics, using MQTT protocol, only topic /config and, maybe, /state can work through subscriptions with the same protocol.
The conclusion I got, after reading many times the documentation, that is not so clear, and asking some questions here at stackoverflow is: you can not use MQTT to subscribe to any topic in order to receive those data sent to /events topic.
To accomplish this, you have to create a Pub/Sub topic associating it to your device:
On Google Cloud IoT Core Console, click on your registry ID;
Create a standard telemetry topic;
After topic created, click on the topic to see its details;
Its details will open on Google Cloud Pub/Sub panel;
In this panel, you can create a subscription to the created topic, by clicking on the "create subscription button".
Now that you have a "google cloud pub/sub topic" linked to "google cloud iot core /events telemetry MQTT topic" and a respective subscription, you can use the google pub/sub library to receive notifications through created subscription when data are sent to /events topic.
Maybe the following link can also help:
https://cloud.google.com/iot/docs/how-tos/devices#creating_a_device_registry_with_multiple_pubsub_topics
I hope this can help you. If I made any mistake in my answer, may someone edit it with some improvement or correction.
Today I got same issues. Seems you cannot get data by subscribe with MQTT. You need to create a pub/sub topic in Goolge iot pub.sub

Topic Subscription for Durable Queues

I wanted to configure a durable queue in one VPN to subscribe to topics from different VPNs. Is it possible to do so? What is the topic expression syntax to refer to topics from other VPNs?
You will need a VPN bridge to bridge messages from one VPN to another.
The purpose of VPNs is to segregate applications into separate messaging domains. Therefore, messages published onto a VPN cannot be seen by another.
A message VPN bridge allows for the delivery of messages that match an explicit set of topic subscriptions from a remote Message VPN to a local Message VPN.
Please refer to the Solace documentation for a full description of how VPN bridges work, and how to configure them.
https://sftp.solacesystems.com/Portal_Docs/#page/Solace_Messaging_Platform_Feature_Guide/Working_With_Message_VPN_Bridges.html#

Blackberry push notification tutorial

I have registered with RIM for the push notification evaluation. But i cant find good sources for implementing push notifications. There are some samples in the sdk but i couldnt find out a way to implement them. So, i am looking for a good tutorial where i could find step by step implementation of push notification services...
RIM's samples for the server side involve setting up a web application container (e.g. Tomcat), setting up a backend database, and then building their Spring-based application. This sample web app handles things like device registration, content subscription, etc. and features a portal to manage everything.
The bare minimum that is required, though, is to send a WAP Push message which is just an HTTP POST to their Push Service servers. Here is a thread from the BlackBerry Support Forums that describes how to use their low-level PAP API to construct this message. Pay attention in particular to the messages by the user mdicesare.
There's also another SO question that has some tips.

Resources