Skip to content
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

Status to configsyslog.loggly.com #57

Closed
wants to merge 2 commits into from

Conversation

@varshneyjayant
Copy link
Contributor

@varshneyjayant varshneyjayant commented Apr 24, 2014

Added function to send script logs to configsyslog.loggly.com

psquickitjayant added 2 commits Apr 24, 2014
Added function to send script logs to configsyslog.loggly.com
#!/bin/bash

#This script needs to be run as a sudo user
if [[ $EUID -ne 0 ]]; then

This comment has been minimized.

@mchaudhary

mchaudhary May 1, 2014
Contributor

Not sure why the script need to be run as root all the time. Customer might not have privilege

This comment has been minimized.

@ghost

ghost May 1, 2014

I think it needs root to restart the rsyslog service

#if not, search it throughout the system. If we find no entries or more than
#1 entry, then we cannot determine the version of the tomcat
if [ $(sudo find / -name catalina.jar | grep tomcat6 | wc -l) = 1 ]; then
CATALINA_JAR_PATH=$(sudo find / -name catalina.jar | grep tomcat6)

This comment has been minimized.

@mchaudhary

mchaudhary May 1, 2014
Contributor

Please log the home path which you discovered based on the catalina log. The other thing is this might take time to discover so we need to show the message to customer saying "Discovering the Catalina home. It might take some time." Once done finding the home. Have another message display "found the home

This comment has been minimized.

@ghost

ghost May 1, 2014

Oh wow I wasn't imagining searching the whole system. I thought we could just check in two places. Only the yum install location, the apt-get location, and nothing else.

This comment has been minimized.

@ghost

ghost May 1, 2014

If it's tomcat7 then we should say we don't support it yet. I would hate to break their system because we haven't tested it yet.

#check if tomcat is configured as a service. If no, then check if we have access to catalina.sh file
elif [ ! -f /etc/init.d/$SERVICE ]; then
logMsgToConfigSysLog "INFO" "INFO: Tomcat is not configured as a service"
if [ ! -f "$LOGGLY_CATALINA_HOME/bin/catalina.sh" ]; then

This comment has been minimized.

@mchaudhary

mchaudhary May 1, 2014
Contributor

Why we need to exit if we don't find catalina.sh file.

@mchaudhary
Copy link
Contributor

@mchaudhary mchaudhary commented May 1, 2014

Jayant please look at my comments on the pull request.

@varshneyjayant
Copy link
Contributor Author

@varshneyjayant varshneyjayant commented May 1, 2014

Looking into these. I will notify you when all the updates will be done.

@mchaudhary mchaudhary closed this May 1, 2014
checkIfValidCatalinaHome "/usr/share/$1"
;;
*"CentOS"* )
checkIfValidCatalinaHome "/usr/share/$1"

This comment has been minimized.

@ghost

ghost May 1, 2014

Yeah this is fine I don't think we need the search unless Manoj think it's a good idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.