Go to All Forums

Managing 24x7 as code

Hi,

We have a pretty big set of alerts in 24x7 by now - 2,000 monitors in a hundred or so monitor groups. It's a pain to keep up with.

What I want to do with 24x7 is what we do for servers and infrastructure, using Chef or Terraform; 

  • Describe what I want in code.
  • Push (or pull) changes using the API.
  • 'Magically' things change.

It looks like my options are 

- Roll out something homemade using bash or python and curl acting on configuration files. 

- I don't know what.

Is there an option to rolling my own 'management by code' tool?

Thanks, in advance,

Like (7) Reply
Replies (15)

Site24x7 has a pretty complete API you can use: www.site24x7.com/help/api/

We are using Python to interface with it. 

Like (0) Reply

Right! I have updated my question to make that part clear.

But much as a Terraform uses the AWS API to edit amazon, I'm looking for a magic application (using the API) I can point at my code and say 'make site24x7 look like that'.  

I'm trying to avoid re-inventing the wheel.

Like (0) Reply

Hi Brian1,

Thanks for your request.

We have a pretty big set of alerts in 24x7 by now - 2,000 monitors in a hundred or so monitor groups. It's a pain to keep up with.

What I want to do with 24x7 is what we do for servers and infrastructure, using Chef or Terraform; 

  • Describe what I want in code.
  • Push (or pull) changes using the API.
  • 'Magically' things change.

 

Could you please elaborate your requirements by stating sample use cases?

For eg.,

1. Instance of a threshold violation for a server monitor's disk - To avoid persistent alerts of the disk violation, would you like to push the increase of threshold value for disk using Site24x7 API? 

2. Using custom scripts, would you like to fetch the DOWN/TROUBLE status using Site24x7 API and perform necessary actions in your environment?

Please provide us the exact use cases, so that it will help us implement the feature to your needs.

 

 

Regards,

Muralikrishnan

 

Like (0) Reply

> Could you please elaborate your requirements by stating sample use cases?

Sorry for the delayed reply.

Use Case 1: Setup

I have a new customer, who has 40 monitors to setup.

  • Describe the alerts in json (or xml or whatever) format.
  • Run a script.
  • Alerts are created.

Use Case 2: Maintenance

I need to update a monitor to raise the threshold for disk space.

  • Update the configuration files
  • Run a script
  • Monitor is updated

Use Case 3: Retirement

Time to get rid of a gang of monitors, and the associated monitor group.

  • Remove the configuration file
  • Run a script
  • The monitors are deleted

 

Use Case 4: Things are breaking and I have to do stuff

Monitor alerts that a server's disk space is full

  • Script executes in reaction to DOWN/Trouble status
Like (0) Reply

Hi Brian,

Thanks for the detailed explanation. 

Use Case 1: Setup

I have a new customer, who has 40 monitors to setup.

  • Describe the alerts in json (or xml or whatever) format.
  • Run a script.
  • Alerts are created.

We have a feature named 'Threshold and Availability Profile'. By setting up a threshold profile, you can define a set of thresholds for a particular monitor type and assign that profile to multiple monitors in bulk.

Steps to create Threshold Profile for Website 

Steps to create Threshold Profile for Server 

Use Case 2: Maintenance

I need to update a monitor to raise the threshold for disk space.

  • Update the configuration files
  • Run a script
  • Monitor is updated

The same feature, Threshold and Availability Profile, can be used wherein you can update the thresholds in an existing threshold profile, by calling the below API:

https://www.site24x7.com/help/api/#update-threshold-profile

We have provided samples for each monitor type, so you can write your own scripts to update the thresholds for a particular monitor type's threshold profile. 

Use Case 3: Retirement

Time to get rid of a gang of monitors, and the associated monitor group.

  • Remove the configuration file
  • Run a script
  • The monitors are deleted

You can write your own script to retrieve and delete multiple monitors. 

The API to retrieve monitors:

https://www.site24x7.com/help/api/#retrieve-monitor

The API to delete multiple monitors:

https://www.site24x7.com/help/api/#delete-multiple-monitors

 

 Use Case 4: Things are breaking and I have to do stuff

Monitor alerts that a server's disk space is full

  • Script executes in reaction to DOWN/Trouble status

Using our feature, IT Automation, you can automate execution of scripts when a particular threshold is violated. Refer our help documentation to know how this works: 

https://www.site24x7.com/help/getting-started/it-automation.html 

https://www.site24x7.com/help/it-automation/server-script.html

 

Hope this fulfills your requirement. For any further queries, please comment in the below thread or contact support@site24x7.com

 

Regards,

Muralikrishnan

 

Like (0) Reply

All of that can be done via the API and Import/Export Monitors features. Because there are so many different automation tools I don't think there's going to be a default method offered. You'd have to build the implementation out yourselves to match the tools you automate with. 

The API connections can then be added to the build configs in your automation tools to create the profiles you need if they are not already configured.  

For bulk adding monitors, you'd want to check their Import Monitors documentation:

: www.site24x7.com/help/admin/import-monitors.html#import-monitor

Like (0) Reply

This discussion about using the API is absolutely nuts. Who's going to write a custom script to manage site24x7 monitors unless they've got a ton of time on their hands. And why would anyone want to manage custom scripts for a single purpose? Are you advocating for having custom scripts for every single service I manage where each one would have it's own way of doing things?

What should exist is a provider for terraform. I already use terraform to setup the vast majority of my infrastructure including pagerduty, datadog, and aws. I don't know what framirez is talking about when he says "there are so many different automation tools". When it comes to infrastructure automation tools, there's really only one tool.

There are cloud specific tools that don't support external resources and then there's terraform. There's also pulumi but that basically piggy back's off of terraform providers.

Please consider creating a terraform provider, that would give you a big advantage over your competitors because I can guarantee you that as soon as any competitor comes out with a terraform provider, I'm going to be jumping to them in an instant.

Like (0) Reply

Hello everyone,

Its great to see valuable feedback from the community. We acknowledge that being a provider in Terraform is valuable and will solve a lot of tasks that needs to be performed frequently.

Can you list the monitor types and admin operations you want to support in Terraform that will be helpful for you? 

While we take stock of important commands, one of our customers has already written a custom Terraform provider for Site24x7 in Github with OAuth support for website monitors. Please check that out.

What Brian has commented is a good start which we will work on. It would be great if we can discuss in detail to get the right requirements to act sooner. 

 

Regards,

-Jasper

Product Manager, Site24x7

Like (0) Reply

So what you are saying is because you only use Terraform there is no other infrastructure management platforms out there or people should only use Terraform?  I'm glad the reality is not like you think and that people have options to choose from.

The price for Site24x7 is significantly lower than other providers that can afford the dev cycles to build a custom integration for all the providers out there, I think Site24x7 is doing a good job in expanding while keeping cost low for their customers.

I think if more people would build out solutions that they need and submit those to Site24x7 for inclusion, things would move along faster. I am not a developer so cannot really built these things but if I could I would.

Ps. I like how a simple google search shows that there was already a provider out there, maybe needs to be adjusted for custom requirements tho...
lmgtfy.com/?q=Terraform+Provider+for+Site24x7

Like (0) Reply

There is also this one github.com/Bonial-International-GmbH/terraform-provider-site24x7 . Maybe it's time for an official one or at least support the development of one of them 

Like (0) Reply

Thank you for taking my post completely out of context. What I said was that terraform is really the only infrastructure as code tool out there so it makes sense for site24x7 to create a provider for that. I did NOT say that because I use terraform, everyone else should use it too.

If you would like to point out an equivalent tool that does infrastructure as code, I would love to learn about it. To that end, I don't count Chef, Puppet, Ansible or SaltStack as IaC tools, they're configuration management tools, see: blog.gruntwork.io/why-we-use-terraform-and-not-chef-puppet-ansible-saltstack-or-cloudformation-7989dad2865c.

If site24x7 wanted to get the most bang for their buck in terms of development cycles, then creating a provider for terraform would be it.

Like (0) Reply

Dear Scott,

   If you are not aware already. We now have a terraform provider.

-Jasper

Like (0) Reply

Hi Jasper,

does your provider have the ability to add schedule maintenance.ie mute monitors during a particular period.

Like (0) Reply

Hey there, Not at the moment. However, we'll work on it. It's in our sprint backlog. Having said that, we welcome community contributions to our provider, would be glad to accept your contributions we already have a few who do it. We encourage you to participate. Here is our repo.

https://github.com/site24x7/terraform-provider-site24x7

-Jasper

Like (0) Reply

Hi,

We have supported schedule maintenance resource in our latest version 1.0.15. Please refer the example https://github.com/site24x7/terraform-provider-site24x7/blob/main/examples/schedule_maintenance_us.tf

Regards,

Jim

Like (0) Reply

Was this post helpful?