Skip to content

Conversation

@chaconpiza
Copy link
Member

No description provided.

@chaconpiza
Copy link
Member Author

Add info for crontab entry: write stdout/stderr to syslog/messages
#set -x

# Set the output directory
outputDataDir="/opt/mem-measurements"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattibf @adriancz
log-agent is installed in /opt/monasca-log-agent/ in customer environment and we can't create this directory. So please change this variable as /opt/monasca-log-agent/.


In this example the script `mem-measurements.sh` will be executed once every hour at minute 20.

1. Save the script `mem-measurements.sh` in the directory `/opt/mem-measurements/`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattibf @adriancz
log-agent is installed in /opt/monasca-log-agent/ in customer environment and we can't create this directory. So please change this variable as /opt/monasca-log-agent/.


```
# crontab -e
20 * * * * /opt/mem-measurements/mem-measurements.sh 2>&1 | logger

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same with L42

20 * * * * /opt/mem-measurements/mem-measurements.sh 2>&1 | logger
```

4. The directory `/opt/mem-measurements/data/` will keep one week of data.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same with L42

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@https://github.com/haruki-yamanashi:
I suggest not to write script output to installation directory of monasca-log-agent.
I changed the script so that output directory can be specified as an optional parameter when calling the script.
Readme.md has been adjusted as well.
Pls. check

mattibf and others added 2 commits September 22, 2020 10:38
Extend with description of parameter "output directory"
Signed-off-by: bandorf <Matthias.Bandorf@est.fujitsu.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants