Skip to content

Instantly share code, notes, and snippets.

@jhodge-chwy
Last active February 19, 2023 19:58
Show Gist options
  • Save jhodge-chwy/34081604b20d5e5a4772a2df5e121136 to your computer and use it in GitHub Desktop.
Save jhodge-chwy/34081604b20d5e5a4772a2df5e121136 to your computer and use it in GitHub Desktop.
awslogs useful bits

awslogs get --aws-region us-east-2 --profile staging-nebula stg-use2-autoshipcore-blue-logs --timestamp -s '2022-10-20 04:00' -e '2022-10-20 04:30' --filter-pattern='{ ($.msg!="Incoming request") && ($.level=50) }' | tee errors_00.log

awslogs get --aws-region us-east-2 --profile staging-nebula stg-use2-autoshipcore-blue-logs --timestamp -s '2022-10-20 04:30' -e '2022-10-20 05:00' --filter-pattern='{ ($.msg!="Incoming request") && ($.level=50) }' | tee errors_01.log

awslogs get --aws-region us-east-2 --profile staging-nebula stg-use2-autoshipcore-blue-logs --timestamp -s '2022-10-20 05:00' -e '2022-10-20 05:30' --filter-pattern='{ ($.msg!="Incoming request") && ($.level=50) }' | tee errors_02.log

awslogs get --aws-region us-east-2 --profile staging-nebula stg-use2-autoshipcore-blue-logs --timestamp -s '2022-10-20 05:30' -e '2022-10-20 06:00' --filter-pattern='{ ($.msg!="Incoming request") && ($.level=50) }' | tee errors_03.log

  • Total Errors
  • Unable to get addressbook due to invalid addressbookid
    • addressId: 233547117 {count}
    • ...etc

sig errors { address - { [addressId] - [dedupe on traceid?] } }

  • HAProxy?

JENKINS_URL = https://jenkins-nonprod.shss.chewy.com JOB_NAME = build-autoship-core // build-${REPO} BRANCH = develop BUILD = lastBuild // or build number

curl --user "$USER@chewy.com:$JENKINS_API_TOKEN" -s ${JENKINS_URL}/job/${JOB_NAME}/job/${BRANCH}/${BUILD}/api/json?pretty=true

grab artifacts from jenkins to attach to CRs

https://jenkins-nonprod.shss.chewy.com/job/build-autoship-core/job/develop/lastBuild/api/json?pretty=true

https://gist.github.com/justlaputa/5634984

fork of maybe useful https://gist.github.com/jhodge-chwy/dececb121d39520e3db7ae5e01bc59a3

py https://gist.github.com/jmcgeheeiv/8a7431aa2483a5a4f420

curl
-H "Accept: application/vnd.github+json"
-H "Authorization: Bearer $GH_TOKEN"
https://api.github.com/repos/Chewy-Inc/autoship-libs/collaborators

/usr/bin/curl
-s -u user@company.com:APIKEY -X GET --get
-H "Content-Type: application/json"
--data 'jql=project=KEY+and+issueType=BUG&expand=changelog'
'https://bymason.atlassian.net/rest/api/2/search'

https://www.postman.com/api-evangelist/workspace/atlassian-jira

curl -s -u jhodge@chewy.com:$JIRA_API_TOKEN -X GET https://chewyinc.atlassian.net/rest/api/3/issue/AP4-60?fields=*all&fieldsByKeys=false

https://github.com/search?utf8=%E2%9C%93&q=topic%3Aautoship&type=Repositories&ref=searchresults

https://github.com/search?q=org%3AChewy-Inc+topic%3Aautoship&type=Repositories&ref=advsearch&l=&l=

autoship-ops git:(main) ✗ asdf install python 3.10.0
python-build 3.10.0 /Users/jhodge/.asdf/installs/python/3.10.0
python-build: use openssl@1.1 from homebrew

why does python want old ssl...

https://github.com/Chewy-Inc/payment-giftcard-service/blob/ab061ff1a22b4dd676dc0ee9debc9f31d55cec8d/Jenkinsfile#L59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment