How to get alerted if Any AzureDevops Build agent is unavailable? - azure-devops-extensions

How can monitor AzureDevops Build Agent status get alerted for any unexpected behaviour which is not placesd in cloud.

Aftering checking the official document, there is no built-in notication to monitor the status of agents.
As a workaround, you could monitor the status by checking "getAgentRequestStatusEndpoint" frequently using Rest API.
GET https://{instance}/{collection}/_apis/distributedtask/agentclouds?api-version=5.0-preview.1

Related

Google iot core connection status

I am using Google IOT core with mongoose os. I wanted to update device connection status to firestore. But i am unable to find event which reports mqtt connection status to pub/sub like when device disconnects or reconnect i.e if device is offline or not.
I am stuck on this problem for days.Any help will be appreciated
Update
As #devunwired mentioned in this response it is now possible to monitor Stackdriver logs for disconnect events. You must have at a minimum enabled INFO level logging on your project in IoT Core > Registries > [your registry] > Edit Registry > Select "Info" log level > Click save.
Original Response
There are a few values you can look at that are tracked in device configuration metadata that you could use to know when a device last was online:
Last Configuration Send time - sent anytime your device connects /
configuration is posted
Last Event Time - Last time an event was sent from the device
Last State Time - Last time state was sent from the device
Last Heartbeat time - Last time MQTT heartbeat was sent
To get you started, here is an example using API explorer that you can fill-in with your project ID, region, registry, and device to query for a specific device's metadata.
For 1...3 you have control over these through device manager and by publishing data. MQTT heartbeat is updated if your device sends an MQTT_PINGREQ message during the "ping period" without other messages getting sent.
At any rate, you could use any of these update time values to see the last time a device was online / functioning. You could query the states of your devices after listing the devices in a registry and could update a Firebase RTDB periodically if that's how you want to report (e.g. using AppEngine TaskQueue). Note that you also just can get these "last connected" values from the Google Cloud Console.
It was said before but we don't have an event for disconnect, just configuration ack, which generally is the connection event. If you want to share state between a device and the device manager, use state messages.
Unfortunately, there's no built in way to do this right now as there aren't events on this state.
However, you could implement a hack by sending a message on connect/disconnect from the device that you have a Cloud Function subscribed to the Pub/Sub topic listening for. It's not perfect as it would fail in the case where the device disconnected unexpectedly.
There currently is no way to do this, that i've been able to find (a year later after this original post). I posted a question here on SO regarding this as well, with more details and link to example code I had to use for handling this:
Google Core IoT Device Offline Event or Connection Status
The AWS IoT platform publishes messages on a special MQTT topic (prefixed with $aws) when your device connects/disconnects. You can easily use these to monitor these events - however, you should be aware that the MQTT protocol is designed to be robust to a poor networking conditions and the broker on the AWS side probably doesn't think it's a bit deal to disconnect a client. The broker expects that the client will just reconnect and queue messages for a moment during that process (which can be a big deal on a microcontroller).
All that being said, the AWS topics you would watch are:
$aws/events/presence/connected/{clientId}
and
$aws/events/presence/disconnected/{clientId}
and the documentation for these (and other) lifecycle events are located: https://docs.aws.amazon.com/iot/latest/developerguide/life-cycle-events.html

Job and device/shadow running at same time on the device

As we know the device can only run one single connection by same client id, based on that. A physical device opens a connection with the device implementation to subscribe to the AWS IoT Shadow. I was wondering how it that will work based on the jobs implementation seems to create another new MQTT client
You use the same connection you already have for your device to use jobs. Jobs are used through publish and subscribe to specific topics. You can read more about jobs MQTT API here: https://docs.aws.amazon.com/iot/latest/developerguide/jobs-api.html#mqtt-describejobexecution

Jenkins send email notification only if last N builds have failed (not per run) - Editable Email Notification

Jenkins 1.6 - 2.x
I have a job which runs every minute or 2 and sometimes the build fails and the next builds passes. For build failures, I'm using Editable Email Notification plugin in Jenkins.
Either using this plugin or any other plugin/way, can I somehow configure Jenkins job to send me a failed build notification ONLY if the last 3 consecutive builds have failed? It's no fun to watch these builds fail and then succeed in the next run so I'm trying to reduce the frequency of such failure notifications OR make it more intelligent.
I have mentioned a comment for a new feature request here:
https://wiki.jenkins.io/display/JENKINS/Email-ext+Template+Plugin?focusedCommentId=132940540#comment-132940540 but looking if someone have tried / achieved something similar.
Email-ext plugin has a Nth failure trigger (Failure - X) but you should really do something about the random failures
As it's mentioned in accepted answer - Email-ext have that feature.
I recently had to use "Failure - X", but message destination had to be Slack channel - not email. In such a situation, you can install on Slack plugin, which generate special email address for given Slack channel. It will allow you to send emails to Slack. Then you use Email-ext on Jenkins so you'll get slack msg after X failed builds.

NewRelic - monitoring process

Any idea if we can monitor a particular process in NewRelic whether it's running or not running?
I see that once we get to the detail of the server, we can see each process's status but my exact requirement is to get notification if the process in the server is running or not.
Use Newrelic Infrastructure option
After you add it to your server:
enter Infrastructure menu
Goto settings -> Alerts and add alert:
select process running alert type and the process you want to monitor
choose Trigger an alert when no processes are running
add policy with your email to get notify

Warning: message-spool operational status is not AD-Active

I am using Solace VMR community edition version 8.1
Whenever I try to create a topic or queue on the VMR the warning message shows up.
I have tried following the guide on
http://docs.solace.com/Configuring-and-Managing-Routers/Configuring-Guaranteed-Msging.htm
but there is no command for allow-guaranteed-message-receive.
I have also tried to using SolAdmin to add the topic and error message says "unable to complete request because router is not active for Guaranteed Delivery"
This was working fine when I used version 8.0 on another machine. Is it due to the version update or something else?
You can view the state of the message-spool in SolAdmin by navigating to the 'Message Spool Configuration' view on the 'General' tab. The Operational Status of the message-spool must be AD-Active in order to use guaranteed messaging or to create a queue or topic endpoint.
If the operational status is showing as AD-Disabled, this means the message-spool has been administratively disabled. You can change this by selecting 'Manage Message Spool Status' from the drop down menu on the right and clicking the gear. There will be a pop up where you can enable the message spool.
If the operational status is showing AD-NotReady, you can scroll down to see the 'Last Failure Reason' which will give you more information about why the message-spool is not ready to become active.
By default when you initialize a new VMR in version 8.1, the message-spool will be AD-Active if the VMR was configured correctly.

Resources