Updates from October, 2021 Toggle Comment Threads | Keyboard Shortcuts

  • ThomasPowell 8:26 am on October 25, 2021 Permalink | Reply
    Tags: , , datadog, , statuspage, statuspage.io   

    How to Automate Uptime Display in StatusPage.io via Synthetic Monitors in Datadog in 4 steps 

    I was given the task of converting a 1/0 metric on our Statuspage.io page from Datadog Metrics using the Route53 healthcheck to an actual percentage uptime display in StatusPage.io, or at least something similarly meaningful to the end user.

    First stop: Service Level Objectives

    When browsing around our current monitors and dashboards, one thing that stood out was “service level objectives.” In combination with synthetics, they provide an uptime percentage over a period of time that can be embedded on the dashboard. [We’ll come back to synthetics on a different approach]

    SLO Synthetics Uptime Display in Datadog

    Next stop: Trying to embed those SLOs

    The System Metrics integration on the statuspage.io side seems to really only be built for flat queries for a point-in-time, and not aggregated over a period of time of days or weeks. A aws.route53.health_check_status query that produced either a 1 or a 0 at any given point in time was fine, but coming up with a way to “query” for a 24 hour or 90 day up time was a different story (impossible to do via direct integration between the two apps?)

    Third stop: UptimeRobot and Similar

    Jyll over @ Veracity.net suggested some experimentation with Uptime Robot and similar services with my own free instance of StatusPage, and it was in stripping away the extra configuration and being able to feed a simple up/down email or webhook to statuspage.io that I came back to the idea of looking to see if I could email or webhook synthetic alerts from Datadog to Statuspage. (Spoiler: You can!)

    Final stop (and the actual steps needed!) Automating Datadog to Send Status to get Uptime Display in StatusPage.io

    1. Add a component in your statuspage.io account
    2. Click on the “Automation” button to get the automation email. Copy that email:
    uptime display in statuspage.io
    Click the Automation button to reveal your automation email

    3. (Create a synthetic monitor that checks a heartbeat route if you don’t already have one)

    4. Go to your synthetic monitor in Datadog… under Step 6 is “Notify your team”. Your monitor name needs to use the template variables {{#is_alert}}DOWN{{/is_alert}}{{#is_recovery}}UP{{/is_recovery}} for statuspage automation to understand the message. The rest of the monitor name is irrelevant (as long as DOWN or UP isn’t a fixed part of that name!)

    The automation email needs to be mentioned in the message body with an @ in front of it.

    Monitor alert settings
    No, that’s not a valid automation email.

     
  • ThomasPowell 7:58 am on October 9, 2021 Permalink | Reply
    Tags: , , m1 mac, node-sass,   

    Error on an M1 Mac loading Rails: node-sass refusing to compile. 

    M1 Mac specific error

    In trying to transfer and restart development on a Rails 6.1.3 app and get it up-to-date, I got an error on an M1 Mac about node-sass not supporting my current environment (the M1 Mac’s ARM 64 architecture).

    ERROR in ./app/assets/stylesheets/application.scss (./node_modules/css-loader/dist/cjs.js??ref--6-1!./node_modules/postcss-loader/src??ref--6-2!./node_modules/sass-loader/dist/cjs.js??ref--6-3!./app/assets/stylesheets/application.scss)
    Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
    Error: Node Sass does not yet support your current environment: OS X Unsupported architecture (arm64) with Unsupported runtime (93)

    Just yarn install?

    Unsurprisingly, this didn’t work, but my first instinct was a yarn install: and a few errors presumably unique to the M1 Mac (or maybe Big Sur’s Xcode environment) showed up:

    ../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::basic_string &' to prevent copying
    for (const auto denominator : denominators)
         ^~~~~~~~~~~~~~~~~~~~~~
    
    .
    .
    
    /Users/tpowell/.node-gyp/16.10.0/include/node/v8-internal.h:489:38: error: no template named 'remove_cv_t' in namespace 'std'; did you mean 'remove_cv'?
                !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
                                    ~~~~~^~~~~~~~~~~
    .
    .
    1 error generated.
    make: *** [Release/obj.target/binding/src/binding.o] Error 1
    gyp ERR! build error
    gyp ERR! stack Error: `make` failed with exit code: 2
    gyp ERR! stack     at ChildProcess.onExit (/Users/tpowell/projects/blog-post-debug/self-journal/node_modules/node-gyp/lib/build.js:262:23)
    gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
    gyp ERR! System Darwin 20.6.0
    gyp ERR! command "/opt/homebrew/Cellar/node/16.10.0_1/bin/node" "/Users/tpowell/projects/blog-post-debug/self-journal/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
    gyp ERR! cwd /Users/tpowell/projects/blog-post-debug/self-journal/node_modules/node-sass
    gyp ERR! node -v v16.10.0
    gyp ERR! node-gyp -v v3.8.0
    gyp ERR! not ok
    Build failed with error code: 1

    Upgrade to node-sass compatible with the M1 Mac via @rails/webpacker

    The const auto denominator error led me to this StackOverflow answer. The last time I had downstream dependency issues, the cleanest resolution was upgrading the @rails/webpacker using outdated dependencies in package.json. The current version is 5.4.3:

    9c9
    <     "@rails/webpacker": "5.2.1",
    ---
    >     "@rails/webpacker": "5.4.3",
    

    After this a yarn install should work fine. (Your need to delete node_modules may vary). Now the assets are compiling and page rendering properly:

    M1 Mac now rendering Bootstrap
    I guess I’ve never been so happy to see Bootstrap-style buttons.
     
  • ThomasPowell 6:35 am on October 5, 2021 Permalink | Reply
    Tags: email and accounts, remove,   

    Remove an Obsolete Work Account from Email and Accounts in Windows 10 

    Trying to Delete from Settings -> Email and Accounts

    I was trying to “fix a problem with one of my accounts” in Windows when I realized that it was an old work account that was complaining. The problem is that “Email and Accounts” in Windows 10 only provides a “Manage” option, which requires login:

    Email and Accounts offers a manage button
    Email and Accounts in Windows 10 with a work or school account

    The answer: Settings -> Access work or school

    This is a pretty simple one but I eventually found the answer here. By going to Settings -> Access work or school, you can [Disconnect]:

    Settings -> Access work or school
    Settings -> Access work or school

    Click on the account that you want to disconnect:

    Settings -> Access work or school -> [click account]

    Click [Disconnect]:

    [Disconnect]

    After clicking [Yes], Windows will churn for a bit and then you should be all done:

    All better
    All done
     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel
%d bloggers like this: