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

Update instructions for using apache chainsaw. #1445

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions docs/docs/While You Wait For Gear/monitoring-OpenAPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,9 @@ If your computer and rig are on the same wifi network you can use Apache Chainsa
1) Logs can be searched for a long time (kept localy on the rig).
1) Can tail new data.

example picture:

### To setup appache chainsaw on your computer, follow the following instructons:
1) Download the following version of appache chainsaw from here: https://github.com/tzachi-dar/logging-chainsaw/releases/download/2.0.0.1/apache-chainsaw-2.0.0-standalone.zip (please note this version was changed to fit the openaps project, other releases of appach chainsaw will not work with a rpii).
1) Download the following version of appache chainsaw from here: https://github.com/tzachi-dar/logging-chainsaw/releases/download/2.0.1/apache-chainsaw-2.0.1.zip (please note this version was changed to fit the openaps project, other releases of appach chainsaw will not work with a rpii).
1) Unzip the file.
1) On ypur pc, create a configuration file called openaps.xml with the following data (for example notepad openaps.xml):
```
Expand All @@ -386,13 +385,14 @@ example picture:
</appender>

<plugin name="VFSLogFileReceiver1" class="org.apache.log4j.chainsaw.vfs.VFSLogFilePatternReceiver">
<param name="fileURL" value="sftp://root:[email protected]:22/var/log/openaps/openaps-date.log"/>
<param name="fileURL" value="sftp://root:[email protected]:22/var/log/openaps/openaps-date.log*"/>
<param name="name" value="sampleVFSLogFileReceiver1"/>
<param name="tailing" value="true"/>
<param name="timestampFormat" value="yyyy-MM-dd HH:mm:ss"/>
<param name="logFormat" value="TIMESTAMP LOGGER MESSAGE"/>
<param name="autoReconnect" value="false"/>
<param name="group" value="group"/>
<param name="maxLogingDays" value="10"/>
</plugin>

<root>
Expand All @@ -408,6 +408,14 @@ example picture:
1) press open file.
1) choose the file openaps.xml
1) (optional) mark the checkbox "always start chainsaw with this configuration."
1) This version will read logs of at least 10 days. you can change that using the parameter maxLogingDays.
1) On some Raspberry Pi installations, there is a need to add the following line to the file /etc/ssh/sshd_config:<br />
Subsystem sftp internal-sftp<br />
After the change restart ssh ```sudo service ssh restart``` and try again.
1) On other Raspberry Pi installations, there is a need to replace the previous line with the following line on the file /etc/ssh/sshd_config:<br />
Subsystem sftp /usr/libexec/openssh/sftp-server<br />
After the change restart ssh ```sudo service ssh restart``` and try again.
see https://support.plesk.com/hc/en-us/articles/213957825-Unable-to-connect-to-SFTP-subsystem-request-for-sftp-failed-subsystem-not-found and https://www.linuxquestions.org/questions/red-hat-31/error-subsystem-cannot-stat-usr-libexec-openssh-sftp-server-4175453017/ for more details. (this step is needed only if chainsaw will fail to connect to your drive).<br />

Chainsaw has a welcome tab and a good toturial, use them.
Still here are a few highligts:
Expand Down