logentriescommunity / le_openshift Goto Github PK
View Code? Open in Web Editor NEWQuick Start on OpenShift
Quick Start on OpenShift
I just started a new PHP 5.4 cartrige on OpenShift Online today, and have been trying to get my logs sent to logentries.com. After following the installation instructions, no logs were being sent to logentries.com so I SSH'd into the app and ran le whoami
, which said no logs were being followed. So I looked through the post_deploy script and noticed that env | grep OPENSHIFT_.*_LOG_DIR
returned no resuts. The only environment variable that contained "LOG" was OPENSHIFT_LOG_DIR.
After I edited the post_deploy script, le whoami
said it was following php.log
How to follow only error log?
It seems that in the post_deploy action hook you are looking for files with _log. to follow. This won't work for a lot of different cartridge types. It is too specific to apache logs. I think it would just be better to add *.log or add nothing and let the user add it in the ini file.
If I stop the app using any command. And then start the app again using:
rhc app start -a {appname}
The monitor daemon never starts because the deploy action_hook is never called. I think you need to actually use the post_start action hook. I can explain more if you need help with it
FYI logentries team -- your current post_deploy bash file won't follow the Node logs, as they are saved as node.log -- filename doesn't include 'log'.
I've added the below to the bottom of my bash file (prior to start monitoring):
# Explicitly follow the Node and HAProxy logs
node=${OPENSHIFT_NODEJS_LOG_DIR}node.log
${OPENSHIFT_REPO_DIR}logentries/le follow "$node"
haproxy=${OPENSHIFT_HAPROXY_LOG_DIR}haproxy.log
${OPENSHIFT_REPO_DIR}logentries/le follow "$haproxy"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.