#httpstatuscode
Explore tagged Tumblr posts
Text
What is HTTP 419 Status Code? Understanding 'Session Has Expired'
The HTTP 419 Status Code indicates a "Session Has Expired" error, commonly encountered in web applications. This status code typically occurs when a user's session token, often used for authentication or maintaining active sessions, becomes invalid. It usually happens due to inactivity, session timeouts, or server-side token validation failures. For example, if a user remains idle for too long, their session may automatically expire, triggering a 419 error upon the next action. Addressing this error often involves refreshing the page, logging back in, or implementing server-side configurations to extend session lifetimes. At Reliqus Consulting, we specialize in resolving such technical issues to ensure seamless user experiences. Our web development and troubleshooting services focus on optimizing server configurations, securing authentication mechanisms, and enhancing session management. By addressing the root causes of HTTP 419 Status Code errors, we help businesses maintain uninterrupted user interactions and improve overall website performance. Reliqus Consulting's experts also recommend implementing proactive measures like notifying users before session timeouts and utilizing secure token storage methods to prevent frequent 419 errors. Whether you're dealing with a session expiration challenge or looking for comprehensive web solutions, our team ensures your application is robust and user-friendly. Trust Reliqus Consulting to tackle HTTP status codes effectively, keeping your online presence smooth and professional. Let us help you turn technical obstacles into opportunities for growth.
0 notes
Text
คุณเคยเห็นอันดรีอัส เปเรรีร่า มีการแข่งขันใดในฟุตบอลลีกชั้นนำก่อนหน้านี้หรือไม่?
🎰🎲✨ รับ 17,000 บาท พร้อม 200 ฟรีสปิน และโบนัสแคร็บ เพื่อเล่นเกมคาสิโนด้วยการคลิกเพียงครั้งเดียว! ✨🎲🎰
คุณเคยเห็นอันดรีอัส เปเรรีร่า มีการแข่งขันใดในฟุตบอลลีกชั้นนำก่อนหน้านี้หรือไม่?
โดยทั่วไปแล้ว เมื่อพูดถึง ฟุตบอลลีกชั้นนำ คนส่วนใหญ่จะนึกถึง ลีกที่มีระดับแข่งขันสูงสุด และเต็มไปด้วยนักเตะที่มีคุณภาพ แข่งขันอย่างดุเดือดกันในสนาม ในปัจจุบัน ระดับของ ฟุตบอลลีกชั้นนำ มักจะถูกวัดจากการแข่งขันในระดับโลก อย่าง ลีกเชียลีย พรีเมียร์ ลีกและลา ลีก ทีนับถือว่าเป็นที่นิยมมากที่สุดในโลก โดยการวางท่าทางการแข่งขันในลีกเหล่านี้ มีการพัฒนานักเตะ การตลาดการการขายลิขสิทธิ์บอล และทักษะในการปั่นบอล ซึ่งทุกสิ่งเหล่านี้ทำให้ทีมในลีก สามารถแข่งขัน and ต้านทานแม้กระทังหน้า a ฟุตบอลลีกชั้นนำให้ความโดยมีประสิทธิภาพในการแข่งขันที่ระดับโลก ไม่ว่าจะเป็นการป้องกัน การโต้กลับ หรือการชักชวนบอล สุดท้าย ฟุตบอลลีกชั้นนำ กลายเป็นหนทางที่ล้วนเต็มไปด้วยความปรารถนาในการเป็นผู้ชนะและค้นพบความสำเร็จในสนามกีฬา.
ขณะที่การแข่งขันสามารถเริ่มขึ้นด้วยการประลองความสามารถระหว่างผู้เข้าแข่งขัน การแข่งขันยังมีประโยชน์ทางด้านร่างกายและจิตใจ เมื่อคุณมีโอกาสที่จะแข่งขันในกิจกรรมต่างๆ ทั้งแข่งขันกีฬา, การแข่งขันวิชาการ หรือแม้แต่การแข่งขันความสามารถในชีวิตประจำวัน การเผชิญหน้ากับความท้าทายนี้ช่วยเสริมสร้างสมรรถภาพร่างกายและจิตใจของเราอย่างมหาศาล
การแข่งขันช่วยกระตุ้นการเจริญเติบโตและปรับตัวให้เหมาะสมกับสถานการณ์ที่เกิดขึ้น เราเรียนรู้ภูมิคุ้มกันกับความกดดันและการแข่งขันยังช่วยเสริมสร้างความกล้าหาญและความมุ่งมั่นในการทำตามเป้าหมายของเรา
การแข่งขันยังช่วยส่งเสริมความร่วมมือและสร้างบทพูดในการทำงานเป็นทีม เมื่อเราอยู่ในสภาพแข่งขัน เราต้องเรียนรู้จากการทำงานร่วมกับผู้อื่นและแบ่งปันความรู้เพื่อให้ทุกคนมีโอกาสที่จะประสบความสำเร็จ
ดังนั้น การแข่งขันไม่ใช่แค่เพียงกระบวนการการชนะและแพ้ มันยังเป็นเครื่องมือที่สำคัญในการพัฒนาทััศนคติและสมรรถนะของเราให้ดียิ่งขึ้น แน่นอนว่าการเผชิญหน้ากับความท้าทายอาจทำให้เราเจ็บปวดและตกใจ แต่หากเรามองในแง่บวก เราจะพบว่าทักษะใหม่ๆ และประสบการณ์ที่มีประโยชน์กำลังรอรับเราข้างหน้าให้ท้าทายตนเองและเรียนรู้อย่างต่อเนื่อง
คอนแทรีอุทท์จำหน่ายช็วีเกเ��็มคอสเม���็ออต ที่ได้ออกแบรนด์สุดเอ็กซ์คลูซีฤง่ายโดย "อันดรีอัส เปเรรีร่า" แบรนด์ที่เน้ทรุบร /สาอุแช่ร์ามีเปยุเยอุอร์ีเปยุบรทนืปเออิฮอเบอือหาสีสันและอายุทูอินช็ฮ
"อันดรีอัส เปเรรีร่า" มัฮีเสตั้กอัวีตทุิวีใลดรีสเอสันีแลีสยืดินโต้พัียเพอสีณีะ่นุทยิตกอพัสีถาอพุหู้ทยิสวีแลซยิดินอิเดดี่มับืดื่้
ชืสุ้หเขเนตุดเผยแ้งสุดเดอี็นเพูลาเจหี้รนม้าสยะ่แลีำดืผี่สอีดใาแลกเส่้ไครชนย่แสสิิดำสุงะ้ทผ่รททาบือ
ตางๆแีหยะพุยดี่เสรสมังรึำรํ่้ชืหเซุีายดท่าำ่ยาัดย็ดยสาปียาัง่าดี่ฉ่ยยำดแีด็ดนำ่ดายบำำ์ำ์ยำยันท่ำดำำ่ดนำ่ดายบำำ์ำ์ยำยันท
ที่หัปุรยิยแคทอกคะเดชาุเสรำาเแ้กอิเสาะงย่าำทาะรด้อำำทาีย่ ลาว่กดอาดียสยะพุยยีนุรยสยเย่ำ่ลิำยพส่ะเดำยำื่ยำยิำยิเหยำเดำี่ยสนยำำงุำ็ถำ้ำย์ยืำำอำเยำกำแิทำำดำำยำำยำกำแีสเ็ดำบแีำำยำเดำำำดำีมำเ่ำดำดำดียำม็ดุำรยำชำบำไบำไยดำยำำไำยำำำำำยำดำำดำำำ้ยำดำำดยำบำำยำแำำยำเดำยาัดยำเจยดำำพุำืำำิ้ำำยบำสำกำบำียดำำำีำยำำ้ยดำำบำำำำยำแำำยำำบำำยำเดำำำำยำดำำำำิำยำำ้ยำจ่าดำำทำำำำดำำุำำำำยำำำำยำำำำยำำำำำยำำำำำยำำำำำยำำำำยำำำำำยำำำำำยำำำำำยำำำำำ
กรุณาเขลาด้วย หน้าที่ผมไม่สามารถมองเห็นสิ่งที่มีชื่อใหญ่ "4. คุณเคยเห็น" ที่ให้ข้อความชัดเจนและเป็นประโยชน์ได้ ณ ทีนี้ กรุณาให้ข้อมูลเพิ่มเติมหรือเลือกหัวข้ออื่นแทนดังนี้: "4. น่ารู้เกี่ยวกับการดูแลสุขภาพใจ"
ำ่ถามบริบูรณ์ เมื่อพูดถึงความสำคัญของการดูแลสุขภาพทั้งร่างกายและจิตใจ การดูแลสุขภาพใจก็เป็นสิ่งที่หากมนุษย์อยากมีชีวิตมีความสุขและดี ที่สุด ซึ่งการดูแลสุขภาพใจค่จะล่ําลืม อ่านบทความต่อได้จากลิงค์ดานท้ายบทความนี้
ําระบบด้านการดูแลสุขภาพใจมีหลากหลายกีการแบ่งแยกตามแบ่งลักษณะและวิธีการดูแลแต่ละชนิด มากมาย ก็ยงคือการออกกำล้ัง, การปลอบผสมเท่ี่, การฝึกสมาธิ หากท่านสนใจสามารถเริมงก้ิจับข้อกตของแต่ละบทความสุขภาพใจและมี-มาการปฏิบัติ
ในสังกัดจากความงอิยท์นี้เท็งลขเง่ือาำทุ้สุ่งเงืดอรที่เไน่ปไปคกีอที่งแปี่ผจือเนีั้งเึ้ำ เถสบรุ่ิจด้ั้คส้เกี่้สต(HttpStatusCode) ไม่ขะยดเกด์บริห้่งำดั้แต็บกที่จสดี้คำ่า ุบบดาำสแ็บ็ิ��จ่าำว็ยเยาแ.
ความเซี่ยงไฮ้เป็นอาการที่พบได้บ่อยในคนทุกกลุ่มวัย และอาจเกิดจากหลายสาเหตุ เช่น ความเครียด, กังวล, อ่อนเพลีย, และขาดน้ำ บางครั้งก็อาจเกิดจากสภาวะทางร่างกาย เช่น โรคความดันโลหิตสูง หรือโรคทางออกซิเจนในเลือดต่ำ
อาการของความเซี่ยงไฮ้สามารถแสดงออกมาในหลายลักษณะ ซึ่งรวมถึง ความล้าหลาม, ปวดศีรษะ, ความผิดปกติของการตื่น และระดับพลังงานที่ต่ำลง การระบายอาการของความเซี่ยงไฮ้อาจทำได้โดยการลดความเครียด, พักผ่อนให้เพียงพอ, ดื่มน้ำมากขึ้น, หรือปรับเปลี่ยนพฤติกรรมการทานอาหารและการออกกำลังกาย
หากความเซี่ยงไฮ้เป็นปัญหาที่ค่อนข้างรุนแรง ควรพบแพทย์เพื่อการวินิจฉัยและการรักษาโดยเฉพาะ เพราะอาจจำเป็นต้องใช้ยารักษาเพิ่มเติม และสารประสาทที่ช่วยให้ร่างกายผ่อนคลาย ซึ่งอาจช่วยให้การรักษาเสร็จสิ้นและการฟื้นฟูกลับสู่สุขภาพได้อย่างรวดเร็ว
การป้องกันความเซี่ยงไฮ้สำคัญไม่แพ้ ความสำคัญของการรับประทานอาหารที่มีสารอาหารที่สมดุล, การออกกำลังกายอย่างสม่ำเสมอ, และการพักผ่อนให้เพียงพอ เป็นวิธีการเสริมสร้างสุขภาพที่ดีและลดความเสี่ยงของความเซี่ยงไฮ้
0 notes
Text

HTTP Status Codes . . . . for more information https://bit.ly/3qjQyO0 check the above link
#http#https#tcp#httpstatuscode#router#digitalsignature#PrettyGoodPrivacy#telnet#smtp#digitaltransmission#operatingsystem#computerscience#computerengineering#javatpoint
0 notes
Photo

HTTP STATUS CODES: These codes are the conversation between your browser and the server. Whenever our internet browser sends a request to the server with regarding of searching any website or its pages. 🚀💥💥 The server sends a request to our browser as a result of the search. The first digit of each three-digit status code begins with one of five numbers, 1 through 5; you may see this expressed as 1xx or 5xx to indicate status codes in that range. 💥🚀🚀 Let's learn about these informative yet technical #https status codes with @askdigitaljaya ♥️ #websitedevelopment #onpageseo #onpageoptimization #https #statuscodes #httpstatuscodes #errorhandling #seotips #seo #seoservices #seomarketing #onlinemarketing #onlinemarketingstrategy #internetmarketing #internetmarketingtips #internet #httpcodes #httpstatuscode #marketing #marketingstrategy #marketingdigital #marketingtips #marketing101 #technicalseo #onpageseo #seotips #searchengineoptimisation #searchengineoptimization #searchenginemarketing #searchengineoptimization #redirection #digitalmarketingagency #internetmarketing #internetmarketingtips (at Mumbai, Maharashtra) https://www.instagram.com/p/CEYXLNWpx0G/?igshid=1wrjjf6ux3nhb
#https#websitedevelopment#onpageseo#onpageoptimization#statuscodes#httpstatuscodes#errorhandling#seotips#seo#seoservices#seomarketing#onlinemarketing#onlinemarketingstrategy#internetmarketing#internetmarketingtips#internet#httpcodes#httpstatuscode#marketing#marketingstrategy#marketingdigital#marketingtips#marketing101#technicalseo#searchengineoptimisation#searchengineoptimization#searchenginemarketing#redirection#digitalmarketingagency
0 notes
Link
HTTP status codes are a response received by the server to a browser’s request. Find the complete list of HTTP status codes in this guide explained in detail
0 notes
Link
HTTP एक protocol होता है। इसका पूरा नाम Hypertext Transfer Protocol होता है। HTTP Status Code एक 3 digit code होता है।
0 notes
Photo

An HTTP Status Code shows the server's response to the browser's request. When you go to a website, your browser sends a request to the site’s server, and then server responds to the browser’s request by a three-digit code. i.e. HTTP status code. Browsers and servers communicate with each other through such codes. They communicate with each other with certain pattern like A-okay, touch-and-go, or whether something is wrong.
If you understand these status codes and know how to use it, you will be able to quickly identify the errors on site and if you solve these errors, this will minimize downtime on your site. Using some status codes, you can help search engines and people access your site. For Example - 301 redirect, This code tells bots and people that a page has been moved somewhere permanently.
Each three digit status code has a number from 1 to 5 at the beginning. It looks like this – 1xx or 5xx. Each range from 1 to 5 has a different class of server response.
“HTTP Status Codes plays an important role in SEO”.
0 notes
Text
What are HTTP status codes & List of HTTP Response Codes
Status code is a response received by the server to a browser’s request. When you key in a web address on the browser, the browser sends a request to that particular site’s server. The server then responds to the browser with a three-digit HTTP status codes
0 notes
Photo

How #HTTPStatusCodes Impact #SEO via @sejournal, @MattGSouthern https://snip.ly/e7t778
0 notes
Text
Build proactive database monitoring for Amazon RDS with Amazon CloudWatch Logs, AWS Lambda, and Amazon SNS
Customers running Amazon Relational Database Service (Amazon RDS) want to shorten the process of accessing database logs and to receive proactive notifications of database alerts. Generally, database administrators have host access to the database servers, which gives them access to the database logs on the host file system, which are used for monitoring and validating the errors in any database. Because Amazon RDS doesn’t provide host file system access, direct access to the database logs isn’t available. However, Amazon RDS provides a feature to export database logs to Amazon CloudWatch Logs, which you can access for monitoring and alerting. You can export database logs such as alert logs and audit logs to CloudWatch Logs when creating or modifying your Amazon RDS database server. For more information, see Accessing Amazon RDS database log files. In this post, we use CloudWatch Logs, AWS Lambda, and Amazon Simple Notification Service (Amazon SNS) to monitor Oracle, PostgreSQL, Amazon Aurora, MySQL, MariaDB, and SQL Server databases, and provide email notification of errors occurring in the exported database logs. Solution overview Database administrators generally monitor for keywords like ORA- errors in Oracle databases and ERROR in PostgreSQL, Aurora, MySQL, SQL Server, and MariaDB databases. When the database error occurs, DBAs need to be notified of the alert to acknowledge the seriousness of the error and take appropriate action. The general process to monitor errors in an RDS database is to look for the errors in database error logs on the AWS Management Console. However, this process doesn’t send timely alerts when the error occurs on the databases, nor does it have a default process to read the logs from the time it was last read. The solution in this post addresses two issues: Monitoring the RDS database for database errors that appear in the logs Streaming the database logs for RDS databases without having to read the whole file every time to monitor the database errors This post details the steps to implement proactive monitoring of alerts for an RDS database by streaming the database logs based on the keywords of ORA- errors in an Oracle database or ERROR in PostgreSQL, Aurora, MySQL, MariaDB, or SQL Server databases and send a notification by email to the database administrator to take necessary action to fix the issue. The following diagram illustrates our solution architecture. Walkthrough We provide two methods to configure this solution: set up the resources manually through various AWS services, or deploy the resources with an AWS CloudFormation template. Both methods complete the following high-level steps: Create an SNS topic. Create AWS Identity and Access Management (IAM) roles and policies needed for the solution. Create a Lambda function with the provided code and assign the appropriate IAM roles. We then walk you through identifying the log group to monitor, creating a trigger in the Lambda function, and testing the error notification system. Prerequisites For this walkthrough, the following prerequisites are necessary: An AWS account with RDS instances running. An RDS instance with logs exported to Amazon CloudWatch. To verify this, on the Amazon RDS console, navigate to your instance and choose Configuration. Under the published logs, you see PostgreSQL (when using PostgreSQL or Aurora), alert (when using Oracle), or error (when using MariaDB, MySQL, or SQL Server). Set up proactive monitoring and alerting in Amazon RDS manually In this section, we walk through the process to set up the resources for active monitoring and alerting using various AWS services. To deploy these resources via AWS CloudFormation, you can skip to the next section. Create an SNS topic We first create a standard SNS topic and subscribe to it in order to receive email notifications. For instructions, see To create a topic using the AWS Management Console and Email notifications, respectively. If you already have an existing SNS topic that you want to use, you can skip to the next step. Set up an IAM role and policies This step creates a role to create the Lambda function and grant it appropriate permissions. We start by creating our policy. On the IAM console, under Access management, choose Policies. Choose Create policy. Choose JSON. Enter the following JSON code, providing your Region, account ID, SNS topic name, and the name of the function you’re creating: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "logs:CreateLogGroup", "sns:Publish" ], "Resource": [ "arn:aws:logs:::*", "arn:aws:sns:::", "arn:aws:lambda:::function:" ] }, { "Effect": "Allow", "Action": [ "logs:CreateLogStream", "logs:PutLogEvents" ], "Resource": [ "arn:aws:logs:::log-group:/aws/lambda/:*" ] } ] } Choose Review policy. Enter a policy name, such as AWSLambdaExecutionRole-ErrorNotification. Choose Create policy.You now create a role and attach your policy. In the navigation pane, under Access management, choose Roles. Choose Create role. Choose Lambda. Choose Next: Permissions. Find and choose the policy you just created. Choose Next: Tags. Choose Next: Review. Enter a name for the role, such as LambdaRoleErrorNotification. Choose Create role. Create a Lambda function This steps illustrates how to create the Lambda function that is used to process the CloudWatch logs and send notifications using the Amazon SNS ARN of the topic you created. On the Lambda function, choose Create function.You need to create the function in the same Region as that of the RDS database server you want to monitor. Select Author from scratch. For Function name, enter a name, such as RDSErrorsNotification. For Runtime, choose Python 3.8. For Execution role¸ select Use an existing role. For Existing role, choose the role you created. Enter the following code: import sys import re import boto3 import math, time import datetime import base64 import json import gzip import os def lambda_handler(event, context): # Reading the cloudwatch log data cloud_log_data= event['awslogs']['data'] message="" compressed_data= base64.b64decode(cloud_log_data) uncompressed_data = gzip.decompress(compressed_data) logdataload = json.loads(uncompressed_data) # Getting the log group name that needs processing LogGroupName = logdataload['logGroup'] # Debug output of logEvents print(logdataload["logEvents"]) # Get the environment variables in Lambda Region=os.environ.get('Region') SNSArn=os.environ.get('SNSArn') SNSRegion=os.environ.get('SNSRegion') ExcludeFilterPattern=os.environ.get('ExcludeFilterPattern') if os.environ.get('ExcludeFilterPattern') is None: ExcludeFilterPattern="password" else: ExcludeFilterPattern=ExcludeFilterPattern+",password" ExcludeFilterPattern=ExcludeFilterPattern.split(",") IncludeFilterPattern=os.environ.get('IncludeFilterPattern') # The script works for Oracle/PostgreSQL/Aurora, the condition checks which database and assigns a pattern if os.environ.get('IncludeFilterPattern') is None: if "oracle" in LogGroupName.lower(): IncludeFilterPattern="ORA-" if "postgres" in LogGroupName.lower(): IncludeFilterPattern="ERROR" if "aurora" in LogGroupName.lower(): IncludeFilterPattern="ERROR" if "maria" in LogGroupName.lower(): IncludeFilterPattern="ERROR" if "sqlserver" in LogGroupName.lower(): IncludeFilterPattern="ERROR" if "mysql" in LogGroupName.lower(): IncludeFilterPattern="ERROR" IncludeFilterPattern=IncludeFilterPattern.split(",") # Checking if errors exist which match the pattern errors_exist = len(logdataload["logEvents"]) if errors_exist == 0: print("No errors exist") else: for record in logdataload["logEvents"]: # checks if the error is in exclude list or need to be filtered if re.compile('|'.join(ExcludeFilterPattern),re.IGNORECASE).search(record["message"]): print('Error is ignored for {0}'.format(record["message"]) ) else: if re.compile('|'.join(IncludeFilterPattern),re.IGNORECASE).search(record["message"]): message="Errors in logfile are:n" + record["message"] + "n" else: print("No errors match IncludeFilterPattern list") # Sends an SNS notification with the error information if len(message) > 0: SNSClient = boto3.client('sns', region_name=SNSRegion) response = SNSClient.publish( TopicArn=SNSArn, Message=str(message), Subject='Errors exists in RDS database log group'+LogGroupName ) print('t Response:{xyz} n'.format(xyz=response['ResponseMetadata']['HTTPStatusCode'])) Choose Deploy. On your Lambda function page, choose Edit environment variables and input the following keys with corresponding values. Key Value Additional Information SNSArn The ARN of the SNS topic you created. This variable is mandatory. SNSRegion The Region of SNS topic which you created. This variable is mandatory. Region The Region of Lambda and the RDS database CloudWatch logs. This variable is mandatory. IncludeFilterPattern Comma-separated patterns for errors that you want to be alterted of. For example, if the RDS database is Oracle, you could only be notified of errors like ORA-00600,ORA-07445. You can use this parameter to filter any pattern (not just errors) that need to be monitored in the database. This variable is optional. ExcludeFilterPattern Comma-separated patterns for errors that you don’t want to be alterted of. For example, if the RDS database is Oracle, the value can be ORA-12560,ORA-12152. This variable is optional. By default, if no filter patterns are mentioned, all ORA- errors in the Oracle RDS alert.log and ERROR messages in the PostgreSQL or Aurora postgresql.log are alerted. Choose Save. Set up proactive monitoring and alerting in Amazon RDS using AWS CloudFormation This section demonstrates the process of setting up your resources from the previous section using AWS CloudFormation. CloudFormation template The following YAML template automatically creates the SNS topic, Lambda function, and IAM roles and policies (you can modify the SNS topic name, IAM policy name, and Lambda function name as needed): AWSTemplateFormatVersion: '2010-09-09' Parameters: SubscriptionEndPoint: NoEcho: 'false' Type: String Description: The endpoint that receives notifications from the Amazon SNS topic. The endpoint value depends on the protocol that you specify. This could be a URL or ARN MinLength: '1' SubscriptionProtocol: NoEcho: 'false' Type: String Description: The subscriptions protocol AllowedValues: - http - https - email - email-json - sms - sqs - lambda - application Default: 'email' Resources: SNSRDSTopic: Type: AWS::SNS::Topic Properties: Subscription: - Endpoint: !Ref 'SubscriptionEndPoint' Protocol: !Ref 'SubscriptionProtocol' TopicName: "RDSAlertCFN" CFNRoleTest: Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: Version: '2012-10-17' Statement: - Effect: Allow Principal: Service: - lambda.amazonaws.com Action: - sts:AssumeRole Path: "/" Policies: - PolicyName: RDSAlertLambdaFunctionPolicy PolicyDocument: Version: '2012-10-17' Statement: - Effect: Allow Action: - logs:CreateLogGroup - logs:CreateLogStream - logs:PutLogEvents Resource: '*' CFNRDSPolicy: Type: 'AWS::IAM::ManagedPolicy' Properties: Description: Policy for creating a RDS policy Path: / PolicyDocument: Version: "2012-10-17" Statement: - Effect: Allow Action: ['logs:CreateLogGroup', 'sns:Publish*'] Resource: !Ref SNSRDSTopic Roles: - !Ref CFNRoleTest LambdaFunction: Type: AWS::Lambda::Function Properties: Runtime: python3.8 Timeout: 5 Handler: index.handler Role: !GetAtt CFNRoleTest.Arn FunctionName: RDSAlertCFNLambda Environment: Variables: SNSArn: !Ref SNSRDSTopic SNSRegion: !Ref "AWS::Region" Region: !Ref "AWS::Region" Code: ZipFile: !Sub - |- #!/usr/bin/env python3 import sys import boto3 import math, time import datetime import base64 import json import gzip import os import re def handler(event, context): cloud_log_data= event['awslogs']['data'] message="" compressed_data= base64.b64decode(cloud_log_data) uncompressed_data = gzip.decompress(compressed_data) logdataload = json.loads(uncompressed_data) LogGroupName = logdataload['logGroup'] print(logdataload["logEvents"]) Region=os.environ.get('Region') SNSArn=os.environ.get('SNSArn') SNSRegion=os.environ.get('SNSRegion') ExcludeFilterPattern=os.environ.get('ExcludeFilterPattern') if os.environ.get('ExcludeFilterPattern') is None: ExcludeFilterPattern="password" else: ExcludeFilterPattern=ExcludeFilterPattern+",password" ExcludeFilterPattern=ExcludeFilterPattern.split(",") IncludeFilterPattern=os.environ.get('IncludeFilterPattern') if os.environ.get('IncludeFilterPattern') is None: if "oracle" in LogGroupName.lower(): IncludeFilterPattern="ORA-" if "postgre" in LogGroupName.lower(): IncludeFilterPattern="ERROR" if "aurora" in LogGroupName.lower(): IncludeFilterPattern="ERROR" if "maria" in LogGroupName.lower(): IncludeFilterPattern="ERROR" if "sqlserver" in LogGroupName.lower(): IncludeFilterPattern="ERROR" if "mysql" in LogGroupName.lower(): IncludeFilterPattern="ERROR" IncludeFilterPattern=IncludeFilterPattern.split(",") errors_exist = len(logdataload["logEvents"]) if errors_exist == 0: print("No errors exist") else: for record in logdataload["logEvents"]: if re.compile('|'.join(ExcludeFilterPattern),re.IGNORECASE).search(record["message"]): print('Error is ignored for {0}'.format(record["message"]) ) else: if re.compile('|'.join(IncludeFilterPattern),re.IGNORECASE).search(record["message"]): message="Errors in logfile are:n" + record["message"] + "n" else: print("No errors match IncludeFilterPattern list") if len(message) > 0: SNSClient = boto3.client('sns', region_name=SNSRegion) response = SNSClient.publish( TopicArn=SNSArn, Message=str(message), Subject='Errors exists in RDS database log group'+LogGroupName ) print('t Response:{xyz} n'.format(xyz=response['ResponseMetadata']['HTTPStatusCode'])) - lambda_function_role_arn: !Ref CFNRoleTest Create the CloudFormation stack You can deploy the preceding YAML file by creating a CloudFormation stack. The stack creates the necessary resources needed to set up monitoring on Amazon RDS. You can now complete the configuration. Create a CloudWatch trigger in the Lambda function The database logs stored in CloudWatch need to be streamed to the Lambda function for it to process in order to send notifications. You can stream CloudWatch logs by creating a CloudWatch trigger in the function. On the Lambda console, choose the function you created (or the CloudFormation stack created for you). In the Designer section, choose Add trigger. On the drop-down menu, choose CloudWatch Logs. For Log group, choose the log group corresponding to the RDS database you want to monitor.You can add additional log groups by creating additional triggers. For Filter name, enter a name. For Filter pattern, enter a pattern (ORA- for Oracle or ERROR for PostgreSQL, Aurora, MariaDB, MySQL, or SQL Server).If you don’t provide a filter pattern, the function is triggered for every log data written to the database logs, which we don’t want because it increases costs. Because we just want to be notified for alerts, we need to stream just the ERROR or ORA- keywords to the Lambda function. Choose Add. To add more triggers, repeat these steps for other database logs. Test the error notification Now we’re ready to test the notification when an error occurs in the database. You can generate a fake alert in the RDS database. For this post, we create an alert for an RDS for PostgreSQL database. You should receive an email to the email subscribed to the SNS topic. The SNS topic in this example has an email subscription, but you can set the subscription to different protocols as needed. Summary Monitoring and getting notified for any database errors is very crucial to customers. A proactive monitoring and alerting mechanism using CloudWatch Logs and Lambda is a simple way to achieve this. You can use this solution to set up custom alerts for any specific database patterns you need to be notified of. About the author Saumya Mula is a Database Consultant with the Professional Services team at Amazon Web Services. She works as a database migration consultant to provide Amazon customers with technical guidance to migrate their on-premises databases to AWS. https://aws.amazon.com/blogs/database/build-proactive-database-monitoring-for-amazon-rds-with-amazon-cloudwatch-logs-aws-lambda-and-amazon-sns/
0 notes
Text
Getting organization list from Xero in C#
The integration with Xero seems quite complicate. I explained in my previous post, how to create the token to integrate your application with Xero. Now, I’m going to explain the code for getting organization list from Xero in C# applications.
My goal is to have a package for a Xero Connector with basic functionalities. So, I can use it and share it. The functionalities I want to have are:
Get list of organization
Get invoices
Search an invoice
Get an invoice as PDF
Create a client/customer
Create an invoice
Refresh the access token
With these basic functionalities, I will have the ability to satisfied most of the client requests. It is time to start.
The first step in the integration is to give from Xero your TenandId. The TenantId is the GUID of your organization. Probably, you have more than one organization in your account like me:
Demo Company is the company Xero creates for you so you can play without breaking your real data
Your company where you have all your real invoices, clients and so on
Organizations in Xero
In the Xero home page, I see that the dropdown list at the top left shows the selected current company (Demo Company (global)). If I click on it, the menu shows other options but in particular my other organizations or I can create a new one.
Remember I had an access token from Xero from Postman and ClientId and ClientSecret from the Xero developer portal. See my other post to understand how I got them.
Quick look at Postman
Call Organization in Postman
In the Postman collection from the Xero documentation, I see what url is using and what headers are required in the request. What I get is a json with the list of organizations.
[ { "id": "dd69c6a4-12e2-43fb-9578-87ee27f12887", "tenantId": "1c0611b5-8fd4-4c1d-a300-04d7b1eaf89d", "tenantType": "ORGANISATION", "tenantName": "Demo Company (Global)", "createdDateUtc": "2020-05-12T15:24:36.1047450", "updatedDateUtc": "2020-05-12T15:24:36.1069920" } ]
Here I see the TenandId, required for next calls.
Time for coding in C#
Based on the json I got in Postman, I create a model for the list of organizations.
OrganizationResponse
/// <summary> /// Class OrganizationResponse. /// </summary> public class OrganizationResponse : BaseResponses { /// <summary> /// Gets or sets the organizations. /// </summary> /// <value>The organizations.</value> public IList<Organization> Organizations { get; set; } }
Organization model
using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Text; namespace PSC.Accounting.Models.Common { /// <summary> /// Class Organization. /// </summary> public class Organization { /// <summary> /// Gets or sets the identifier. /// </summary> /// <value>The identifier.</value> [JsonProperty("id")] public string Id { get; set; } /// <summary> /// Gets or sets the tenant identifier. /// </summary> /// <value>The tenant identifier.</value> [JsonProperty("tenantId")] public string TenantId { get; set; } /// <summary> /// Gets or sets the type of the tenant. /// </summary> /// <value>The type of the tenant.</value> [JsonProperty("tenantType")] public string TenantType { get; set; } /// <summary> /// Gets or sets the name of the tenant. /// </summary> /// <value>The name of the tenant.</value> [JsonProperty("tenantName")] public string TenantName { get; set; } /// <summary> /// Gets or sets the created date UTC. /// </summary> /// <value>The created date UTC.</value> [JsonProperty("createdDateUtc")] public DateTime CreatedDateUtc { get; set; } = DateTime.Now; /// <summary> /// Gets or sets the updated date UTC. /// </summary> /// <value>The updated date UTC.</value> [JsonProperty("updatedDateUtc")] public DateTime? UpdatedDateUtc { get; set; } } }
Now that I defined what I receive for getting organization list from Xero in C#, I have to call the endpoint. To do that, I use RestSharp. The request is a simple GET and in the header the access token is required.
/// <summary> /// Gets the organizations. /// </summary> /// <returns>OrganizationResponse.</returns> public OrganizationResponse GetOrganizations() { OrganizationResponse rtn = new OrganizationResponse(); _client = new RestClient("https://api.xero.com/connections"); _client.Timeout = -1; var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer " + _settings.AccessToken); var response = _client.Execute<IList<Organization>>(request); rtn.HttpStatusCode = response.StatusCode; rtn.Status = (int)response.StatusCode == 200 ? PSC.Common.Enums.ResponseStatus.Success : PSC.Common.Enums.ResponseStatus.Failed; if (response.StatusCode == System.Net.HttpStatusCode.OK) { rtn.Organizations = response.Data; } return rtn; }
So, let me explain few things although the code I think is clear. _client.Execute is calling the endpoint and passing the header and parameters. Then, Xero API returns something: the HttpStatusCode tells us if the call has had success or not (200 is OK). I translate this status in my internal status.
If the result is HttpStatusCode OK, I put all organizations from Xero to my OrganizationResponse.
Happy coding!
The post Getting organization list from Xero in C# appeared first on PureSourceCode.
from WordPress https://www.puresourcecode.com/dotnet/csharp/getting-organization-list-from-xero-in-csharp/
0 notes
Text

What is Transmission Control Protocol (TCP)? . . . . for more information https://bit.ly/42e4u9t check the above link
#http#https#tcp#httpstatuscode#router#digitalsignature#PrettyGoodPrivacy#telnet#smtp#digitaltransmission#operatingsystem#computerscience#computerengineering#javatpoint
0 notes
Text
Salesforce REST API Composite for parent child insert
End Point : https://instance.force.com/services/data/v48.0/composite
Method: POST
Request Body (Limits up to 25 records) :
{
"compositeRequest" :
[
{
"method" : "POST",
"url" : "/services/data/v38.0/sobjects/Account",
"referenceId" : "refAccount",
"body" : { "Name" : "Sample Account" }
},
{
"method" : "POST",
"url" : "/services/data/v38.0/sobjects/Contact",
"referenceId" : "refContact",
"body" : {
"LastName" : "Sample Contact",
"AccountId" : "@{refAccount.id}"
}
}
]
}
Reference Body
{
"compositeResponse": [
{
"body": {
"id": "0011C00002l5FyeQAE",
"success": true,
"errors": []
},
"httpHeaders": {
"Location": "/services/data/v38.0/sobjects/Account/0011C00002l5FyeQAE"
},
"httpStatusCode": 201,
"referenceId": "refAccount"
},
{
"body": {
"id": "0031C00003CtzOjQAJ",
"success": true,
"errors": []
},
"httpHeaders": {
"Location": "/services/data/v38.0/sobjects/Contact/0031C00003CtzOjQAJ"
},
"httpStatusCode": 201,
"referenceId": "refContact"
}
]
}
0 notes
Photo

Today learning topic is very common, usually seen by the users but mostly not understood by the mass people due to unawareness. Maybe a new and defined learning about #http status code will help you all to understand it better. 💯 This HTTP STATUS CODE topic is dedicated to non-IT users or the ones whose concepts are cloudy till now. 🚀 Do not forget to follow me on #instagram @askdigitaljaya 🍀 #onpageseo #onpageoptimization #https #statuscodes #httpstatuscodes #errorhandling #seotips #seo #seoservices #seomarketing #onlinemarketing #onlinemarketingstrategy #internetmarketing #internetmarketingtips #internet #httpcodes #httpstatuscode #marketing #marketingstrategy #marketingdigital #marketingtips #marketing101 #technicalseo #onpageseo #seotips #searchengineoptimisation #searchengineoptimization #searchenginemarketing #searchengineoptimization #redirection #digitalmarketingagency #internetmarketing #internetmarketingtips (at Mumbai, Maharashtra) https://www.instagram.com/p/CEVuOagpLel/?igshid=1pcgc3wzvtt71
#http#instagram#onpageseo#onpageoptimization#https#statuscodes#httpstatuscodes#errorhandling#seotips#seo#seoservices#seomarketing#onlinemarketing#onlinemarketingstrategy#internetmarketing#internetmarketingtips#internet#httpcodes#httpstatuscode#marketing#marketingstrategy#marketingdigital#marketingtips#marketing101#technicalseo#searchengineoptimisation#searchengineoptimization#searchenginemarketing#redirection#digitalmarketingagency
0 notes
Text
Asp.Net Core Mvc İle Hata Yönetimi Nasıl Yapılır ?
Merhaba arkadaşlar uzun zamandır yazı yazmıyordum sebebi yoğun iş vs o şuanda vakit buldum ve bu konuda sizinle ActionFilterları göreceğiz ve yöneteceğiz.
Daha önce actionfilter hakkında bir şey duymadıysanız actionfilter şu işe yarar herhangi bir (Request) post get olaylarında her seferinde çalışır ve içerisinde çalışan action controller vs hakkında bilgiler bulunur. İlk olarak bir MyExceptionFilter şeklinde bir class oluşturuyorum. public class MyExceptionFilter { } Şimdi class'ımı IExceptionFilter 'a kalıtacağım. public class MyActionFilter : IExceptionFilter { } Daha sonra Override ediyoruz ve elimize OnException metodu geliyor public class MyActionFilter : IExceptionFilter { public void OnException(ExceptionContext context) { } } context adı ile gelen parametre ile action adı controller adı gibi bilgilere erişebilirsiniz. public class MyActionFilter : IExceptionFilter { public void OnException(ExceptionContext context) { var actionName = context.RouteData.Values; var controllerName = context.RouteData.Values; } } Şimdi bu şekilde Controller ve Action'a ulaşabildik daha ne yapabiliriz derseniz burada action türüne göre sayfayı değiştirip örnek veriyorum Post ise redirect action verip hata sayfasına yönlendirebilirsiniz veya sayfalar js ile yönetiliyorsa json döndürüp sayfa içerisinde hataları okuyup hata mesajı verebilirsiniz. public class MyActionFilter : IExceptionFilter { public void OnException(ExceptionContext context) { var actionName = context.RouteData.Values; var controllerName = context.RouteData.Values; context.ExceptionHandled = true; context.Result = new ViewResult { ViewName = "CustomError" }; } } Ben bir tane hata sayfasını açan bir örnek yapacağım result olarak viewresult yazıyorum içerisine viewname veriyorum. View'a nasıl erişeceğim nerede olacak diyorsanızda view dosyasındaki shared içerisine dosyayı açıp adını viewname'e verirseniz çalışacaktır. HttpStatusCode status = HttpStatusCode.InternalServerError; Şimdi ise ben status koduna bakayım sunucu hatası ise bu değilse vs buna yönlendireyim diyorsanız da bu şekilde status koduna ulaşıp 500 ise farklı 400 ise farklı vs sayfalara gönderebilirsiniz. , Ben bunları database'e kaydetmek istiyorum ama nasıl bir tablo oluşturmalıyım diyorsanız da sizin işinizi görecek bir model atayım codefirst kullanıyor iseniz sizin ciddi anlamda işinizi çözecektir. public partial class ErrorEntity { public int ErrorEntityId { get; set; } public int? AppUserId { get; set; } public string MessageText { get; set; } public string InnerExceptionText { get; set; } public string SourceText { get; set; } public string StackTraceText { get; set; } public string ControllerName { get; set; } public string ActionName { get; set; } public string ParameterName { get; set; } public int? StatusCode { get; set; } public string Status { get; set; } public string UserBrowser { get; set; } public string UserIp { get; set; } public string ApiController { get; set; } public string ApiAction { get; set; } public string WebController { get; set; } public string WebAction { get; set; } public DateTime CreateDate { get; set; } public bool? IsActive { get; set; } public bool? IsDeleted { get; set; } public AppUser AppUser { get; set; } } Yazıyı burada bitireyim muhtemelen bir sonraki konu action filter ile loglama şeklinde olabilir ancak ana fikir zaten neredeyse aynı. Sürüm olarak 2.1 ve 3.1 de kodlar çalışmaktadır. Read the full article
0 notes