<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Allgood.systems on David Hamann</title><link>https://davidhamann.de/tags/allgood.systems/</link><description>Recent content in Allgood.systems on David Hamann</description><generator>Hugo</generator><language>en</language><copyright>&amp;copy; David Hamann</copyright><lastBuildDate>Sun, 28 Jul 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://davidhamann.de/tags/allgood.systems/feed.xml" rel="self" type="application/rss+xml"/><item><title>allgood.systems: get a Slack message when your server goes down</title><link>https://davidhamann.de/2024/07/28/slack-message-when-server-goes-down/</link><pubDate>Sun, 28 Jul 2024 00:00:00 +0000</pubDate><guid>https://davidhamann.de/2024/07/28/slack-message-when-server-goes-down/</guid><description>&lt;p&gt;I was recently asked if it&amp;rsquo;s possible to post a message to a Slack channel whenever the state of a monitor on &lt;a href="https://allgood.systems"&gt;allgood.systems&lt;/a&gt; changes (for example, a web server goes down, a job starts failing, etc.).&lt;/p&gt;
&lt;p&gt;The answer is &amp;ldquo;yes&amp;rdquo;, and it&amp;rsquo;s quite easy to set this up once you have a Slack app configured.&lt;/p&gt;
&lt;p&gt;All you need to do on allgood&amp;rsquo;s side is to add a web hook to your notification group, enter the URL you get from Slack, and define what message you want to send.&lt;/p&gt;
&lt;h2 id="creating-a-slack-app"&gt;Creating a Slack app&lt;/h2&gt;
&lt;p&gt;In the past you could just add Slack&amp;rsquo;s &lt;a href="https://slack.com/apps/A0F7XDUAZ-incoming-webhooks?tab=more_info"&gt;&amp;ldquo;Incoming WebHook&amp;rdquo;&lt;/a&gt; to your workspace and were – more or less – done.&lt;/p&gt;
&lt;p&gt;A while ago, however, this method was deprecated, and Slack now recommends to create your own &amp;ldquo;App&amp;rdquo; instead.&lt;/p&gt;
&lt;p&gt;&amp;ldquo;Creating an app&amp;rdquo; sound more involved than it actually is. You just have to click through a few menus to &amp;ldquo;build&amp;rdquo; one.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s follow the &lt;a href="https://api.slack.com/quickstart"&gt;Quick Start Guide&lt;/a&gt; and take the following actions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;a href="https://api.slack.com/apps"&gt;Apps&lt;/a&gt; and click &amp;ldquo;Create New App&amp;rdquo; -&amp;gt; &amp;ldquo;From scratch&amp;rdquo;. Then give your app a name, for example &amp;ldquo;allgood bot&amp;rdquo;, and choose the workspace to use it in.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img alt="New Slack app" loading="lazy" src="https://davidhamann.de/images/slack-app-name-min.png"&gt;&lt;/p&gt;
&lt;ol start="2"&gt;
&lt;li&gt;Go to &amp;ldquo;OAuth &amp;amp; Permissions&amp;rdquo; -&amp;gt; &amp;ldquo;Scopes&amp;rdquo;, and then add the following &amp;ldquo;Bot Token Scopes&amp;rdquo;: &lt;code&gt;chat:write.public&lt;/code&gt; and &lt;code&gt;chat:write&lt;/code&gt;. This will allow your bot to post messages.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img alt="Configure scopes" loading="lazy" src="https://davidhamann.de/images/slack-scope-min.png"&gt;&lt;/p&gt;
&lt;ol start="3"&gt;
&lt;li&gt;Go to &amp;ldquo;Incoming WebHooks&amp;rdquo; and set it to &amp;ldquo;enabled&amp;rdquo;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img alt="Enable webhooks" loading="lazy" src="https://davidhamann.de/images/slack-webhooks-min.png"&gt;&lt;/p&gt;
&lt;ol start="4"&gt;
&lt;li&gt;Go back to &amp;ldquo;Basic Information&amp;rdquo; and click &amp;ldquo;Install to Workspace&amp;rdquo;. You will be prompted to allow the bot&amp;rsquo;s actions and have to select a channel for your bot to post in (for example &lt;code&gt;#general&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img alt="Install to Workspace" loading="lazy" src="https://davidhamann.de/images/slack-basic-info-min.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Install to Workspace" loading="lazy" src="https://davidhamann.de/images/slack-permission-min.png"&gt;&lt;/p&gt;
&lt;ol start="5"&gt;
&lt;li&gt;Go back to &amp;ldquo;Incoming WebHooks&amp;rdquo;, and copy the URL that is referenced for the channel you selected.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img alt="Install to Workspace" loading="lazy" src="https://davidhamann.de/images/slack-webhook-url-min.png"&gt;&lt;/p&gt;
&lt;p&gt;Now, log back into allgood.systems and continue the setup there.&lt;/p&gt;
&lt;h2 id="setup-on-allgoodsystems"&gt;Setup on allgood.systems&lt;/h2&gt;
&lt;p&gt;&lt;img alt="Notifications settings" loading="lazy" src="https://davidhamann.de/images/allgood-notifcations-min.png"&gt;&lt;/p&gt;
&lt;p&gt;First, you go to notification settings and then either select an existing notification group or create a new one.&lt;/p&gt;
&lt;p&gt;For the existing or new group, you can then click on &amp;ldquo;Add member&amp;rdquo;, select &amp;ldquo;Web hook&amp;rdquo; as type and &amp;ldquo;POST&amp;rdquo; as method:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Web hook configuration" loading="lazy" src="https://davidhamann.de/images/allgood-webhook-min.png"&gt;&lt;/p&gt;
&lt;p&gt;Now, you can copy the web hook URL from Slack and enter it into the URL field.&lt;/p&gt;
&lt;p&gt;In the JSON payload you can define your desired message structure and make use of the available placeholders (such as the monitor url).&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;{
 &amp;#34;blocks&amp;#34;: [
 {
 &amp;#34;type&amp;#34;: &amp;#34;section&amp;#34;,
 &amp;#34;text&amp;#34;: {
 &amp;#34;type&amp;#34;: &amp;#34;mrkdwn&amp;#34;,
 &amp;#34;text&amp;#34;: &amp;#34;{{subject}}&amp;#34;
 }
 },
 {
 &amp;#34;type&amp;#34;: &amp;#34;section&amp;#34;,
 &amp;#34;text&amp;#34;: {
 &amp;#34;type&amp;#34;: &amp;#34;mrkdwn&amp;#34;,
 &amp;#34;text&amp;#34;: &amp;#34;👉 &amp;lt;{{monitor_url}}|View Monitor&amp;gt;&amp;#34;
 }
 }
 ]
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you&amp;rsquo;ve attached the web hook to a notification group already linked to your monitors, your setup is now complete.&lt;/p&gt;
&lt;p&gt;If you instead created a new notification group, go to one of your monitors, select &amp;ldquo;Edit&amp;rdquo; and choose the new group in the monitor&amp;rsquo;s notification settings.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Select notification group" loading="lazy" src="https://davidhamann.de/images/allgood-notification-selection-min.png"&gt;&lt;/p&gt;
&lt;p&gt;Now, whenever a notification is triggered, you will see a new message in your configured Slack channel.&lt;/p&gt;
&lt;p&gt;And, if you enabled repeated down notifications, you will also get these notifications repeatedly in Slack.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Bot message in Slack" loading="lazy" src="https://davidhamann.de/images/slack-message-allgood-min.png"&gt;&lt;/p&gt;</description></item><item><title>allgood.systems: Monitoring the duration of your background jobs</title><link>https://davidhamann.de/2023/09/26/allgood-monitoring-duration-cron-jobs/</link><pubDate>Tue, 26 Sep 2023 00:00:00 +0000</pubDate><guid>https://davidhamann.de/2023/09/26/allgood-monitoring-duration-cron-jobs/</guid><description>&lt;p&gt;Since the launch of &lt;a href="https://allgood.systems"&gt;allgood.systems&lt;/a&gt; you were able to monitor if your background jobs, scheduled tasks, cron jobs, etc. were running whenever you expected them to be running.&lt;/p&gt;
&lt;p&gt;This was accomplished by defining an interval on allgood and then sending a request to a check-in URL at the end of your script.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Configuring a job monitor" loading="lazy" src="https://davidhamann.de/images/allgood_configure_job.png"&gt;&lt;/p&gt;
&lt;p&gt;If the request didn&amp;rsquo;t arrive at the end of the specified interval, you would get a notification that your job is down.&lt;/p&gt;
&lt;p&gt;This still works the same way. But from now on you can also choose to send an additional request at the beginning of your jobs.&lt;/p&gt;
&lt;p&gt;This allows you to get an idea how long your jobs typically run (average, minimum and max are being displayed).&lt;/p&gt;
&lt;p&gt;&lt;img alt="Duration information for job monitors" loading="lazy" src="https://davidhamann.de/images/allgood_job_duration.png"&gt;&lt;/p&gt;
&lt;p&gt;You can learn more by &lt;a href="https://docs.allgood.systems/job-monitors/measure-duration-of-running-job"&gt;reading the documentation&lt;/a&gt; or &lt;a href="https://allgood.systems"&gt;just trying it out&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The feature is live as of now.&lt;/p&gt;
&lt;p&gt;As always, let me know if you have additional ideas that could be helpful.&lt;/p&gt;</description></item><item><title>Monitoring FileMaker scheduled scripts</title><link>https://davidhamann.de/2022/08/12/monitor-filemaker-scheduled-scripts/</link><pubDate>Fri, 12 Aug 2022 00:00:00 +0000</pubDate><guid>https://davidhamann.de/2022/08/12/monitor-filemaker-scheduled-scripts/</guid><description>&lt;p&gt;In this tutorial I want to describe how you can setup immediate notifications whenever your scheduled FileMaker scripts stop running – for example due to a crashed FileMaker scripting engine, an error in your script or just general server downtime.&lt;/p&gt;
&lt;p&gt;I will be using &lt;a href="https://allgood.systems"&gt;allgood.systems&lt;/a&gt;, a monitoring platform &lt;a href="https://davidhamann.de/2022/04/09/monitoring-cronjobs-websites/"&gt;I recently built&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="creating-a-new-job-monitor"&gt;Creating a new Job Monitor&lt;/h2&gt;
&lt;p&gt;Once you have registered on &lt;a href="https://allgood.systems"&gt;allgood.systems&lt;/a&gt; you can navigate to the &amp;ldquo;Job Monitors&amp;rdquo; tab to create a new monitor for the FileMaker script you would like to get notifications for.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Adding a new job monitor" loading="lazy" src="https://davidhamann.de/images/allgood_add_jobmonitor.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Configuring job monitor" loading="lazy" src="https://davidhamann.de/images/allgood_jobmonitor_form.png"&gt;&lt;/p&gt;
&lt;p&gt;We can give the monitor a name for reference and then set a check-in interval.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s say our script is scheduled to run every 60 minutes. Accounting for some delays and runtime, it makes sense to define a custom check-in interval of 65 minutes.&lt;/p&gt;
&lt;p&gt;Our plan here is to get notified if and when the scheduled FileMaker script does not run in a timeframe of 65 minutes.&lt;/p&gt;
&lt;p&gt;Leaving the other options as default, we can click &amp;ldquo;Save&amp;rdquo;.&lt;/p&gt;
&lt;h2 id="integrating-the-check-in-url"&gt;Integrating the check-in URL&lt;/h2&gt;
&lt;p&gt;After adding the monitor it will have a &amp;ldquo;Started&amp;rdquo; status. This means it is active but has not yet received a check-in or detected any downtime.&lt;/p&gt;
&lt;p&gt;Clicking on the monitor will reveal its &amp;ldquo;check-in URL&amp;rdquo;. Copy the link to your clipboard and then head over to your FileMaker script.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Copying the check-in URL" loading="lazy" src="https://davidhamann.de/images/allgood_jobmonitor_url.png"&gt;&lt;/p&gt;
&lt;p&gt;Generally, it makes sense to let your script check in after it has successfully performed its tasks. Let&amp;rsquo;s go ahead and add an &lt;code&gt;Insert From URL&lt;/code&gt; step near the end of the script.&lt;/p&gt;
&lt;p&gt;For our demo monitor configured above this step could look like this:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# check-in at allgood

Insert from URL [ Select ; With dialog: Off ; Target: $result ; &amp;#34;https://ping.allgood.systems/l/j/phY3K0ADSMadoohzFs0Xaw&amp;#34; ; Verify SSL Certificates ] 
Exit Script [ Text Result: True ] 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Every time your script is run you should now see a check-in entry on allgood. And if there&amp;rsquo;s ever the situation where no check-in happens in the defined interval (no matter what the cause is), you will get a notification based on your settings on allgood (an email by default).&lt;/p&gt;
&lt;p&gt;&lt;img alt="Verifying the check-in on allgood" loading="lazy" src="https://davidhamann.de/images/allgood_jobmonitor_checkin.png"&gt;&lt;/p&gt;
&lt;h2 id="want-more"&gt;Want more?&lt;/h2&gt;
&lt;p&gt;In the same way as described above you could also add so-called &amp;ldquo;Trap Monitors&amp;rdquo;. In this case you would place the URL-triggers in places which you think are executed very rarely (for example edge-cases in your scripts). If those rare cases happen, you want to know immediately. Thus, with &amp;ldquo;Trap Monitors&amp;rdquo; you will get a notification on every (!) check-in.&lt;/p&gt;
&lt;p&gt;Additionally, to just monitor the uptime of your FileMaker Server itself, you can do so with &amp;ldquo;Net Monitors&amp;rdquo; – either by checking if the server responds on port 5003, if the WebDirect/Data API/welcome page responds as expected or if your domain resolves successfully. As an extra you will also get reminders when your SSL/TLS certificates are about to expire. See &lt;a href="https://docs.allgood.systems"&gt;the documentation&lt;/a&gt; for more information.&lt;/p&gt;
&lt;p&gt;Have any more questions? Feel free to reach out.&lt;/p&gt;</description></item><item><title>Monitor websites and detect when cron jobs and scheduled tasks are not running</title><link>https://davidhamann.de/2022/04/09/monitoring-cronjobs-websites/</link><pubDate>Sat, 09 Apr 2022 00:00:00 +0000</pubDate><guid>https://davidhamann.de/2022/04/09/monitoring-cronjobs-websites/</guid><description>&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; Want to monitor your websites or get notified when your cron jobs or scheduled tasks are not running when they are supposed to run? Check out &lt;a href="https://allgood.systems"&gt;https://allgood.systems&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;img alt="Allgood dashboard" loading="lazy" src="https://davidhamann.de/images/allgood_dashboard.png"&gt;&lt;/p&gt;
&lt;p&gt;For quite some time I was planning to build some piece of software that notifies me when a web app goes down, returns unexpected results, or changes content. In addition – since it&amp;rsquo;s often hard to keep track of all the background jobs that are running – I needed and wanted something that informs me when my services stop (!) doing what they are supposed to do in regular intervals (which is often detected much later and in turns makes recovery/clean-up much harder).&lt;/p&gt;
&lt;p&gt;While I was thinking through the problem I also noticed how frequently in the past I received reports about applications that apparently stopped working from one day to the other. Often the reason turned out to be that someone forgot to renew a TLS certificate and no automated renewal was set up (while automation is generally better, often it&amp;rsquo;s just not done or you are not in control). So getting notifications about upcoming SSL certificate expirations was another thing that fit into the scope of the project.&lt;/p&gt;
&lt;p&gt;Finally, I wanted a service which could quickly give me a private HTTP endpoint and alert me instantly whenever it received any request – for example to get informed about rare events, check when some page or file is opened, test for vulnerabilities, etc.&lt;/p&gt;
&lt;p&gt;With this concrete need and a desire to learn a couple of new technologies along the way, I built a service that now addresses the above use cases. If you like to try out an early version of it, feel free to head over to &lt;a href="https://allgood.systems"&gt;https://allgood.systems&lt;/a&gt; and sign-up. With some limitations you can use it free of charge. For usage examples, please also see the &lt;a href="https://docs.allgood.systems/"&gt;documentation&lt;/a&gt;.&lt;/p&gt;</description></item></channel></rss>