Comments (19)
Alberto,
In order to extend to another account:
-Login to that account
-Create a stack in that account using this template https://s3.amazonaws.com/solutions-reference/aws-instance-scheduler/latest/instance-scheduler-remote.template
-Enter the number of the account in which the Scheduler is deployed
-The stack creates a cross account role that gives the Scheduler account permissions to make the required calls
-In the output from the stack locate the arn of the created role
-Log in to the scheduler account and update the scheduler stack, enter the arn of the cross account role in the list of accounts in which you want to scheduler instances
from instance-scheduler-on-aws.
It might be the fact that in the up period the begintime > endtime which is not allowed (we do not support wrapping of times as this might conflict with the weekdays specifications). In the log stream you can see the message "stop_date must be equal or later than start_date" at the point the scheduler loads the configuration and it skip the invalid period and the schedule it is used in. Normally these situations are caught by the CLI when you create the periods that uses the same code as the scheduler to check the schedule/period data.
you case you need 3 periods
up1 -> 00:00-00:15
down -> 00:16-06:15
up2-> 06:16-23:59
The scheduler will stop/start the instances at 00:16 and 06:16 to resize it
If this schedule needs to run every day with the same times you can omit the weekdays as well.
from instance-scheduler-on-aws.
Thanks a lot. It works perfectly.
from instance-scheduler-on-aws.
Hi,
in order to create periods and schedules i use dynamoDB console and some of them are working but the rest don't. I get the following warning in the CloudWatch logs:
2018-03-17 - 23:56:14.401 - WARNING : Skipping instance EC2:i-0487694xxxx33dbef (ServerEnterprise) in region eu-west-1 for account 7xxxxx09562, schedule name "esc-vertical" is unknown
Any idea whats is going on?
Thanks
from instance-scheduler-on-aws.
This means that the scheduler has found an instance with the tag you used for specifying the name of the schedule, but it can not find that schedule in the dynamodb configuration table. Make sure there is an entry of type schedule in the database with exactly that name. (case sensitive and beware of leading and training spaces)
A simple way to test is to the the scheduler-cli describe-schedules command that uses the same logic as the configuration reader of the scheduler.
from instance-scheduler-on-aws.
Thank you for your response. Unfortunately, i am still having the same issue and the scheduler-cli describe function detetcts the entries,
{
"Schedules": [
{
"Timezone": "Europe/Madrid",
"Name": "demanda",
"Type": "schedule",
"Description": "Vertical scaling",
"Periods": [
"[email protected]",
"[email protected]"
]
}
{
"Periods": [
{
"Description": "Down hours",
"Weekdays": [
"mon-sun"
],
"Begintime": "00:16",
"Endtime": "06:15",
"Type": "period",
"Name": "down"
}
{
"Description": "Up hours",
"Weekdays": [
"mon-sun"
],
"Begintime": "06:16",
"Endtime": "00:15",
"Type": "period",
"Name": "up"
}
I also add the tag "Schedule = demanda" in the EC2 instance.
Thanks
from instance-scheduler-on-aws.
Thanks again, that was the key. Using CLI everything works fine.
from instance-scheduler-on-aws.
Hi arieleeuw ,
I've seen that you are also involved in AWS OpsAutomator solution. I succesfully deployed the solution and i also a Create Snapshot Task but i can not find the snapshot. Where is locate it? i don't receive any error in CloudWatch logs, so i guess it is working fine.
Thnk you in advance.
Alberto.
from instance-scheduler-on-aws.
Snaphots are created in the account you are Ops Automator running or in the accounts for which you added cross account roles for in the task. You should see them in the EC2 console under snapshots. Make sure to tag the Instances correctly. The name of the tag is by default OpsAutomatorTaskList and the value should include the name of the task stack you created to configure your task.
from instance-scheduler-on-aws.
from instance-scheduler-on-aws.
Can you send me the the parameters and/or the configuration records for the task?
What is your cronies interval?
from instance-scheduler-on-aws.
from instance-scheduler-on-aws.
from instance-scheduler-on-aws.
from instance-scheduler-on-aws.
from instance-scheduler-on-aws.
So this thread came up with the google search for "schedule name "X" is unknown". I solved the issue by using the correct form for timezone. I was getting the error when using "America/New_York". Im now using "US/Eastern" and it seems to be working. I dont know if this helps you or not, but figured id respond with a positive result.
from instance-scheduler-on-aws.
Hi,
Can you please check the original spelling of the timezone you used as this should be a valid timezone. For timezones we use the pytz module and according to this module this is a valid timezone name.
$ python
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:39:47)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pytz
>>> pytz.timezone("America/New_York")
<DstTzInfo 'America/New_York' LMT-1 day, 19:04:00 STD>
>>>
from instance-scheduler-on-aws.
Closing due to time elapsed since last correspondence. Please re-open this if you are still having an issue.
from instance-scheduler-on-aws.
As an addendum to this, the cross account roles are referenced in DynamoDB in the ConfigTable created by the CloudFormation stack. You can see the references in type/Partition Key = Config > cross_account_roles
.
from instance-scheduler-on-aws.
Related Issues (20)
- Terraform Deployment HOT 2
- Lambda not logging if Cloudwatch Log Group Name too long HOT 2
- Stop and Restart EC2 once in a month; normal times EC2 is in running mode HOT 3
- Masking schedules between date ranges HOT 5
- Create Period WIth Monthdays Failed HOT 5
- Scheduler config is not honored and default is used HOT 1
- Report inability to start/stop multi-az RDS as WARNING? HOT 1
- Support ignore schedule tag value HOT 1
- Stop and start of EC2 part of an ASG HOT 1
- Instances dont start or stop HOT 2
- DynamoDB not updating following CloudFormation Update HOT 5
- Latest version of CloudFormation template is not deployed in official s3 bucket HOT 1
- Feature Request: Allow multiple timezones HOT 6
- CLI Documentation: --use-metrics not a valid option HOT 2
- CloudWatch alarm enable and disabl HOT 12
- Instance Scheduler should allow for instance type flexibility HOT 4
- DynamoDB enable deletion protection for tables HOT 2
- Support for Israel(Tel Aviv) Region "il-central-1" HOT 3
- Can't start instance without correct KMS permissions HOT 1
- Report Negative Scheduling Patterns HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from instance-scheduler-on-aws.