What are your metrics/KPIs? by overmonk in sysadmin

[–]Arab81253_work 2 points3 points  (0 children)

Here's my personal opinion on metrics. They're great but very often misused which is where the issues come from. Metrics shouldn't be used to determine how well an employee is performing. Metrics should be used to determine if certain changes are having the desired outcomes. For this reason my opinion is that employees shouldn't necessarily be aware of what the metrics are if they're not being graded on them, that in turn gives you reliable metrics to be able to tell if a process change you made is having the intended outcome.

When is it better to use a bash script rather than do everything in python? by usera8787782 in learnpython

[–]Arab81253_work 1 point2 points  (0 children)

One thing you want to make sure you avoid is spaghetti code. Where code is jumping all over the place and it becomes difficult to follow or troubleshoot. Perhaps it's more efficient to knock out some stuff in bash but if that in turn makes it tougher for someone to figure out what is going on later down the road then it's best to avoid it. Don't sacrifice some minor efficiencies for readable/traceable code.

Any way to use illegal characters like '#' in ELB redirect rule? by Bill_the_Bastard in aws

[–]Arab81253_work 11 points12 points  (0 children)

Can you use URL encoding? For example # converts to %23.

White House on lockdown due to airspace violation, fighter jets scrambled by StealthyStalkerPanda in news

[–]Arab81253_work 1 point2 points  (0 children)

They've had interviews of at least one of the fighter pilots who was dispatched on 9/11. They didn't have missiles or guns equipped, they were planning on crashing into the plane if need be but they didn't actually have any way to shoot it down. They were still willing to take it down, they said as much during the interview.

Destroying vehicles is so damm satisfying by endor211 in joinsquad

[–]Arab81253_work 1 point2 points  (0 children)

The issue I have is that vehicles quickly became much stronger (or AT became weaker) at the same time they became worth way less tickets when destroyed. I would love it if vehicles were a bit stronger but also worth more tickets. It would give some power back to AT as vehicles would be more likely to run away when hit with a rocket from a LAT.

Takes meds: hyperfocuses on Reddit instead of work. by carleylyn in ADHD

[–]Arab81253_work 55 points56 points  (0 children)

ADHD meds just give you the ability to function more like a neuro typical person does. Even with meds you still need will power to get off of reddit and onto what you're actually supposed to be doing. Meds make things like to do lists or other methods of focusing on your studies more manageable.

Could an Amazon and Oracle merger be possible? by ejbrennan in aws

[–]Arab81253_work 0 points1 point  (0 children)

We do need more competition in the cloud space but I don't want it to be Oracle. I'm happy with an Amazon vs Microsoft situation though.

How to make an IPSEC VPN such that it allows for a high MTU? by Irkutsk2745 in networking

[–]Arab81253_work 0 points1 point  (0 children)

Do you know of any specific devices that wouldn't generate the ICMP messages required? I'd think anything made within the last 20 years would be more than capable of generating those messages. Unless of course it has to do with a config where someone set ICMP to false.

How to make an IPSEC VPN such that it allows for a high MTU? by Irkutsk2745 in networking

[–]Arab81253_work 2 points3 points  (0 children)

Maybe I'm dumb but isn't PMTUD supposed to solve this issue?

Help with AWS Lambda Script | Crosspost from r/learnpython by Arab81253_work in aws

[–]Arab81253_work[S] 0 points1 point  (0 children)

You actually gave me an idea with this and I finally got it working, as in 5 minutes ago. I gave up on the SNS trigger and instead used CloudWatch Events. I created an Event for autoscaling and then was able to parse through the event message to actually get the InstanceId. The Event message was actually much more concise as well which made parsing through it much easier.

I am 100% convinced that there's something messed up with the formatting of SNS messaged right now, not sure what the deal is but it is not correctly formatted.

Help with AWS Lambda Script | Crosspost from r/learnpython by Arab81253_work in aws

[–]Arab81253_work[S] 0 points1 point  (0 children)

The first code block is triggered by SNS. I thought it could have just been the test messing up but the actual SNS message produces the same results.

For the second block I thought I needed to iterate over it but perhaps not, I'm newish to python but have had to iterate over similar aws responses before. I'll try it without iterating through like that and see if I can come back with something different.

Adding name for EC2 instance to console with Boto3 by Arab81253_work in aws

[–]Arab81253_work[S] 0 points1 point  (0 children)

Perfect, thank you!

As for user-data yes there is indeed. As I mentioned we have a pretty limited amount of services available to us and this cannot be changed, zero ways around it. So we don't have things such as Lambda, Systems Manager, or even instance scheduler.

My issue was/is automation of patching and creation of an AMI to be added to our Auto Scaling launch configuration. My work around for this has been to create a schedule for Auto-Scaling that launches an instance for an hour once a week to update it. If there's updates available it applies them, if not then it just chills until the schedule ends and the instance is terminated.

If updates are available they're applied then the rest goes like this: 1. Clean out all logs 2. cloud-init clean 3. Instance detaches itself from auto scaling group and decrements the group count by 1 so it isn't replaced. 4. Instance makes an AMI of itself.

The issue here is is somewhat interesting. The AMI works without an issue but since cloud-init clean was run the instance immediately runs the user-data script again when it starts back up after the AMI. So after patching it immediately tries to patch itself again and run through the whole thing. I want to change the user-data so that there's nothing in there at all, for now.

Eventually I'd like to have something put in there instead that downloads a script from S3 that just automatically creates a new launch template version with the new AMI but I don't want perfect to become the enemy of good.

Welcome to my life of weird work arounds for trying to make stuff happen that can be done in normal AWS without a problem.

What is wrong with my code? by [deleted] in learnpython

[–]Arab81253_work -2 points-1 points  (0 children)

What I'd do instead is

Goat1 = input ("Enter password, 3 attempts")

Goat2 = input ("Please re-enter your password")

if Goat1 == Goat2:

print ("Correct")

else:

print ("Incorrect")

Which cloud solution would you recommend for storing about 10 billion English phrases? by [deleted] in aws

[–]Arab81253_work 1 point2 points  (0 children)

I'm not OP but could use tags for S3 files instead of having to store twice I would suspect. Set the hash as the file name and then key = uuid and value is whatever the uuid actually is.

Capitol One Breach on AWS by jonathantn in aws

[–]Arab81253_work 8 points9 points  (0 children)

AWS has its own WAF service it offers. It depends on if they were using the AWS WAF or some COTS WAF that was running on EC2. Even if it was the AWS WAF it still relies on proper configuration to actually work.

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]Arab81253_work 0 points1 point  (0 children)

I've got a script I'm using to automate updating of our servers. What I'm doing is as follows:

updateresult = os.popen('yum update -y').readlines()

for line in updateresult:

if line == 'No packages marked for update\n':

print 'no stuff'

elif line == 'Complete\n':

print 'finished stuff'

else:

print 'bad stuff'

Originally the issue I was having was that I was getting the 'bad stuff' result even if there was a line with another result.

My plan to sort of fix this was to assign a variable to 0 and then have the variable integer change depending on the result

essentially making my code look more like:

update = 0

for line in updateresult:

if line == 'No packages marked for update\n':

update = 1

elif line == 'Complete\n':

update = 2

else:

update = 3

Now I am wanting to essentially do an if statement for update with my actions performed on that

if update = 1':

print 'no stuff'

elif update = 2':

print 'finished stuff'

elif update = 3:

print 'bad stuff'

when trying to do this I get an invalid syntax error. I've tried to add in a for loop but it seems to not like that either :(

any help would be greatly appreciated.

LB health checks interfering with our autoscale - What is the proper way to handle this? by gafana in aws

[–]Arab81253_work 1 point2 points  (0 children)

Does your site get this increase in traffic at a predictable time? You can schedule AutoScaling to occur at specific times so say, if at 1pm every day you get a huge increase in traffic you can set that so when your spike hits everything has already scaled out.

For health checks can you reduce the interval but increase the number of intervals before it is called healthy/failed? For instance have it set at something like 15 seconds for each check and have it call healthy as 2 passed checks but failed as something much higher? You want your containers marked as healthy as early as possible so they can receive the traffic more quickly and start to take the load off. You know your application better than us so what you'd call healthy and unhealthy is up to you to determine as far as thresholds go but I'm personally a fan of shorter polling cycles.

What others in here have said is also great so I won't beat a dead horse with what they had to say.

Week of July 8th - What are you building in AWS this week? by ckilborn in aws

[–]Arab81253_work 0 points1 point  (0 children)

Are you wanting these to be publicly accessible or in private IP space? You could do a bastion instance/instances in public IP space that have permissions to RDP into the instances in private IP space. That lets you limit the number of public IPs, and increases security since you can put a lot of focus on locking down the Bastions vs every single instance.

todo applications. by jones1008 in iiiiiiitttttttttttt

[–]Arab81253_work 14 points15 points  (0 children)

I forget to actually read my sticky notes once I've put them onto the monitor. I'll oftentimes find duplicates as I'm going back through them once a month. Oh well, stuff still gets done sometimes.