logMsgToConfigSysLog "INFO""INFO: Not overwriting the existing configuration. Exiting"
exit 1
break;;
* ) echo"Please answer yes or no.";;
esac
done
fi
}
#check the size of the log file. If the size is greater than 100MB give a warning to the user. If the file size is 0
#then exit
checkLogFileSize()
{
monitorFileSize=$(wc -c "$1"| cut -f 1 -d '')
if [ $monitorFileSize-ge 102400000 ];then
logMsgToConfigSysLog "INFO""INFO: "
whiletrue;do
read -p "WARN: There are currently large log files which may use up your allowed volume. Please rotate your logs before continuing. Would you like to continue now anyway? (yes/no)" yn
case$ynin
[Yy]* )
logMsgToConfigSysLog "INFO""INFO: Current size of $LOGGLY_FILE_TO_MONITOR is $monitorFileSize bytes. Continuing with File Loggly configuration.";
break;;
[Nn]* )
logMsgToConfigSysLog "INFO""INFO: Current size of $LOGGLY_FILE_TO_MONITOR is $monitorFileSize bytes. Discontinuing with File Loggly configuration."
exit 1
break;;
* ) echo"Please answer yes or no.";;
esac
done
elif [ $monitorFileSize-eq 0 ];then
logMsgToConfigSysLog "WARN""WARN: There are no recent logs from $LOGGLY_FILE_TO_MONITOR so there won't be any data sent to Loggly. You can generate some logs by writing to this file."
exit 1
else
logMsgToConfigSysLog "INFO""INFO: File size of $LOGGLY_FILE_TO_MONITOR is $monitorFileSize bytes."
fi
}
#function to write the contents of syslog config file
ProTip!
Use n and p to navigate between commits in a pull request.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.
We use optional third-party analytics cookies to understand how you use GitHub.com so we can build better products.
Learn more.
We use optional third-party analytics cookies to understand how you use GitHub.com so we can build better products.
You can always update your selection by clicking Cookie Preferences at the bottom of the page.
For more information, see our Privacy Statement.
Essential cookies
We use essential cookies to perform essential website functions, e.g. they're used to log you in.
Learn more
Always active
Analytics cookies
We use analytics cookies to understand how you use our websites so we can make them better, e.g. they're used to gather information about the pages you visit and how many clicks you need to accomplish a task.
Learn more
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added modular scripts - Tomcat, Apache2, File Monitorin, S3 File Monitoring and Nginx Server #69
Added modular scripts - Tomcat, Apache2, File Monitorin, S3 File Monitoring and Nginx Server #69
Changes from 1 commit
a24007e7d10190b12a1f14160bca8e46033040fcaf3f133cd1e00b42c6b391f1de793f318770bdc77925e6d46ebafb9a362868b89cb88b8fb0115f9dee3dc38e2117169324a4200fd934bfbbc06f4412fa1b62221ae7d6bfe0a4520cf4b301d22a45d63e96dc6197df9a98ed38bffdca35323ad5d6e6363752d2cc4bf09404891f114f566d138ef2faac29fab45d7e9be5085d2364a89e96a0304c2ffe6302c24385df450f9c864d8fee9382cac6726c54ab7c64f4b3e7a73283d44e13beccd2a9d522f8151b89ecc077959787d9529d982bbc505b9cfb1435dcab5502f3cf7eb8abcd07eac676a9436f9991e9fbc22bc309919125cda8b4bc7d1e727dbf18ab84686db7f7443a2d377e408af5520e0ef389892538b62c0fc716576fd0d7654e389371118c5ba05c43ab896a25d17eca27e7bc4cb0d9732b55c6803e0cb2603c5b2dac442f49cfdb4ccf1c248476a5efFile filter...
Jump to…
Added s3 monitoring scripts