looking for someone who knows the API

@jangs:

Hi Adam,

i did it :-)

Linode is awesome for providing the API.

See more information

Linode Manager for Android

Release History

/*

  • Atenciosamente/ Regards/ Saludos,

  • Jan Souza

*/

Jan -

We're looking for someone who knows the API Really well. Do you think this would be possible:

1. Naggios generates an email / alert that a linode is down (service wise, SMTP / POP3 / IMAP - anything)

2. Naggios will send an email to whatever email address / mailbox

3. based on the email sent, a server will send an API command to the affected box to reboot.

4. If services are not back within 15 minutes, a service ticket to Linode is created.

Basically we've had (2) linodes needing migration or manual intervention by linode. 1 during the middle of the day which took us some time too look at before trying to reboot, waiting 40 minutes for linode to respond until finally migrating to a new hardware node. The other instance , we were closed for the day (3am) and a node failed. It took us hours before noticing, linode support answered quickly but basically said to just wait out the reboot…

If I could automate this with our Naggios, that would be awesome.

1. is it possible?

2. how much?

Thanks,

Aryn

11 Replies

You should probably start a a different thread for this, rather than reviving a thread that's been dead for a year.

Filing a ticket via the API isn't possible, and isn't what you'd want to do in any case. While I realize you've had a stretch of bad luck those incidents are few and far between. The vast majority of issues you're likely to see are going to be due to issues in your installation, and won't be something Linode support will be able to solve.

I'd probably design it such that Nagios issues the reboot via the API itself. There's a couple ways to do this, but the "obvious" way would be to create a contact that executes a command to issue the reboot, and then set up an escalation to that contact after some time. This would allow some time between notifying the humans and issuing a reboot.

Hmm, now that you mention it, I've got an old web server running ColdFusion that likes to implode during its nightly maintenance tasks. Right now, Nagios wakes up my boss's girlfriend, and then she issues a reboot command to my boss, but I think I can optimize this a bit…

@JshWright:

You should probably start a a different thread for this, rather than reviving a thread that's been dead for a year.

Filing a ticket via the API isn't possible, and isn't what you'd want to do in any case. While I realize you've had a stretch of bad luck those incidents are few and far between. The vast majority of issues you're likely to see are going to be due to issues in your installation, and won't be somethingi Linode support will be able to solve.

I didn't ask for the ticket to be submitted via api…just to be submitted.

And thus far, 2 in one week is enough to ask.

I don't like having servers in someone else's control and just HOPE things go well.

Sorry, I meant "There isn't any automatic way to file a ticket" API or otherwise.

@JshWright:

Sorry, I meant "There isn't any automatic way to file a ticket" API or otherwise.

Not even via email? (what if you were remote , can't get to your linode manager due to "security" lock ) Support wouldn't help?

Actually - just making a ticket in our system (via email) would be better than nothing, we'd have a log of when it happened.

Or we could script something to submit via http.

@Alohatone:

@JshWright:

Sorry, I meant "There isn't any automatic way to file a ticket" API or otherwise.

Not even via email? (what if you were remote , can't get to your linode manager due to "security" lock ) Support wouldn't help?

Actually - just making a ticket in our system (via email) would be better than nothing, we'd have a log of when it happened.

Or we could script something to submit via http.

Your monitoring should not be submitting tickets to linode. You have an unmanaged VPS here, you need to be checking it before opening a ticket to linode that something is wrong. Your case for submitting a ticket "4. If services are not back within 15 minutes, a service ticket to Linode is created." could just as easily be that you have screwed up a config file and caused your services to fail as it could be something wrong that linode needs to fix.

@glg:

@Alohatone:

@JshWright:

Sorry, I meant "There isn't any automatic way to file a ticket" API or otherwise.

Not even via email? (what if you were remote , can't get to your linode manager due to "security" lock ) Support wouldn't help?

Actually - just making a ticket in our system (via email) would be better than nothing, we'd have a log of when it happened.

Or we could script something to submit via http.

Your monitoring should not be submitting tickets to linode. You have an unmanaged VPS here, you need to be checking it before opening a ticket to linode that something is wrong. Your case for submitting a ticket "4. If services are not back within 15 minutes, a service ticket to Linode is created." could just as easily be that you have screwed up a config file and caused your services to fail as it could be something wrong that linode needs to fix.

When a hardware node dies, you have to wait in line for linode to manually move the VE.

@Alohatone:

When a hardware node dies, you have to wait in line for linode to manually move the VE.

Automatically opening a ticket won't make emergency migrations go any faster.

It might be a better idea to work towards increasing the availability of your service: using multiple Linodes and having procedures in place for dealing with the loss of them will turn hardware failures into annoyances, rather than catastrophes.

Automated ticket filing has too much risk of fouling up and spamming trouble tickets, which would have a negative impact on the quality of service for the rest of Linode's customers. It's not a reasonable request to make; your monitoring software should notify YOU that something is wrong, at which point you should make the judgement call about if the problem requires a ticket to be filed.

I mean, if your monitoring system files a ticket because your linode is unresponsive, but it turns out that it was something that you did to your linode (like turn it off), a trouble ticket wouldn't be appropriate!

@Alohatone:

@glg:

@Alohatone:

Not even via email? (what if you were remote , can't get to your linode manager due to "security" lock ) Support wouldn't help?

Actually - just making a ticket in our system (via email) would be better than nothing, we'd have a log of when it happened.

Or we could script something to submit via http.

Your monitoring should not be submitting tickets to linode. You have an unmanaged VPS here, you need to be checking it before opening a ticket to linode that something is wrong. Your case for submitting a ticket "4. If services are not back within 15 minutes, a service ticket to Linode is created." could just as easily be that you have screwed up a config file and caused your services to fail as it could be something wrong that linode needs to fix.

When a hardware node dies, you have to wait in line for linode to manually move the VE.

So? Your monitoring CANNOT detect a hardware failure. Anything your monitoring can detect could just as easily be your screwup.

Alohatone,

If you want automatic reboot your linode server, you can do it by Linode API.

You can create a bash Script that make a call at Linode API for reboot (http://www.linode.com/api/linode/linode.reboot) and check the Server status (http://www.linode.com/api/linode/linode.list), after that you can put Nagios to call this script.

Linode API it's http request, so you can do it with wget.

Piece of cake ;-)

/*

  • Atenciosamente/ Regards/ Saludos,

  • Jan Souza

*/

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct