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

monitor_metrics.sh errors out when checkpoint logs don't exist #10

Open
jakeRM opened this issue Feb 24, 2020 · 0 comments
Open

monitor_metrics.sh errors out when checkpoint logs don't exist #10

jakeRM opened this issue Feb 24, 2020 · 0 comments

Comments

@jakeRM
Copy link
Contributor

jakeRM commented Feb 24, 2020

the function monitor_checkpoint errors out on perforce servers that don't have checkpoint logs. This is due to how the log files are being discovered using ls on line 205

    for f in $(ls -tr /p4/$SDP_INSTANCE/logs/checkpoint.log*);

The error: "ls: cannot access /p4/1/logs/checkpoint.log*: No such file or directory"

I will be submitting a pull request to address this issue and others

jakeRM added a commit to jakeRM/p4prometheus that referenced this issue Feb 24, 2020
FIXES:
Resolves an issue with the script running on replicas
Resolves an issue with the script running and no checkpoint logs are found

IMPROVEMENTS:
* monitor_errors() function will only run on the latest log updates to errors.csv by using a data file to retain where it parsed on the last run
* monitor_completed_cmds() function will only run on the latest log updates to p4 log file by using a data file to retain where it parsed on the last run.
* If log files are not updated then the prom files are deleted so they do not keep sending stail data to the node_exporter

# Links to open issues addressed by this change:
perforce#11
perforce#10
perforce#9
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

No branches or pull requests

1 participant