Help with automations, routing

:robot: Kuma (Baserow’s AI assistant): often the fastest way to get help. Try asking Kuma before posting here. Available to all SaaS users, and to self-hosted users with a connected AI model.

on

Are you using our SaaS platform (Baserow.io) or self-hosting Baserow?

Self-hosted

If you are self-hosting, what version of Baserow are you running?

latest Baserow API spec (2.1.6)

If you are self-hosting, which installation method do you use to run Baserow?

docker i believe

What are the exact steps to reproduce this issue?

Good Morning,
I have recently started using baserow in the last month. I have learned a lot and have accomplished a lot. But I am stuck on automations, and more practically routes.

I have a LibreNMS server that monitors hundreds of pieces of networking equipment, and have setup a API to push outages and recoveries to baserow. They land in one table, with a new row created with the following data:
-device_name
-IP
-Status (blank or 1, 1 being resolved, blank being down)
-device_id(unique ID to each piece of equipment)
-alert_message
-last_alert
-last_ping
-last modified field
-formula that automatically detects based on status value if is down or resolved.

I am trying to build a automation, and think I should start with routes? My goal is to have it watch for items coming in, if it has a status of blank, (indicating it is down) shoot me an email. (I have gotten the email part working and tested), then take info from the row, put it into a table named “current outages”.out of words

Adding on;

Having baserow have some sort of logic (Which i thought I could use the ‘routing’ function to read if the status (From the formula) is either DOWN or Recovered. Then take that and go down its seperate path.

I was going to get that completed, then have it delete rows / update rows as needed to reflect if a currently ‘down’ device has recovered, then delete it from the currently down table and move it to a recently resovled table.

ANY help / ideas is much appreciated!

hi @devonthomson welcome to the Baserow community!

From what you’ve described, this is what I think you need to do.

Your first node should be an HTTP Trigger node.

Your second node should be a Create Row node that simply logs the event to a table.

Your third node should be a Router node that evaluates the event’s status, and creates logs the outage to another table.

You can see the screen recording for a basic example of how you might configure this.

This is great. Thank you for sharing, could there be a way to build off this, if a ‘recover’ status is received, to delete the original outage (or log it somewhere else?) - Ideally, I would like a live table that shows what devices are truly down, and as they recover, they get taken out from current outages to past outages?

Sorry, my reply fell through the cracks!

Yes, you can find the original outage either by using a List multiple rows node with a filter. If you know the Row ID, you can filter by the Row ID (or also combine with a filter):

This node’s output contains the node ID, which you can then use in a subsequent Delete a row node or Update a row node to either delete or update the row.