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,

Reply 1
Replies (6)

Re: Managing 24x7 as code

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

We are using Python to interface with it. 

Reply 2

Re: Re: Managing 24x7 as code

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.

Reply 0

Re: Re: Re: Managing 24x7 as code

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

 

Reply 0

Re: Re: Re: Re: Managing 24x7 as code

> 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
Reply 0

Re: Re: Re: Re: Re: Managing 24x7 as code

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

 

Reply 0

Re: Re: Re: Re: Re: Managing 24x7 as code

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

Reply 1