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

check_tsd references unknown attribute; unusable #760

Closed
stromnet opened this issue Apr 4, 2016 · 2 comments
Closed

check_tsd references unknown attribute; unusable #760

stromnet opened this issue Apr 4, 2016 · 2 comments
Assignees
Labels
Milestone

Comments

@stromnet
Copy link
Contributor

stromnet commented Apr 4, 2016

tools/check_tsd line 231 tries to read options.bad_percent, which was removed in 010ed96:

$ python /usr/local/share/opentsdb/tools/check_tsd -H xxxxx -p 4242 -m owfs.reading -t alias=device_cnt -w 34 -c 0 -v
Connected to 2001:xxxxxx:2:4242
send: 'GET /q?start=600s-ago&m=sum:owfs.reading{alias=device_cnt}&ascii&nagios HTTP/1.1\r\nHost: back-1.stromnet.se:4242\r\nAccept-Encoding: identity\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: text/plain
header: Age: 0
header: Cache-Control: max-age=0
header: Content-Length: 4256
owfs.reading 1459792803 34 alias=device_cnt bus=main type=stats_bus ch=None
owfs.reading 1459792863 34 alias=device_cnt bus=main type=stats_bus ch=None
...
owfs.reading 1459796050 34 alias=device_cnt bus=main type=stats_bus ch=None
owfs.reading 1459796110 34 alias=device_cnt bus=main type=stats_bus ch=None

ignored 46/56 data points for being more than 600s old
worse data point value=34 at ts=1459795569
Traceback (most recent call last):
  File "/usr/local/share/opentsdb/tools/check_tsd", line 258, in <module>
    sys.exit(main(sys.argv))
  File "/usr/local/share/opentsdb/tools/check_tsd", line 231, in main
    if options.bad_percent is not None and rv > 0 \
AttributeError: Values instance has no attribute 'bad_percent'

check_tsd can thus never output a valid OK value, it crashes before it reaches the OK printer.

Also described in #728.

@stromnet stromnet changed the title check_tsd references unknown attribute check_tsd references unknown attribute; unusable Apr 4, 2016
@johann8384 johann8384 added the bug label Apr 7, 2016
@johann8384 johann8384 added this to the v2.4.0 milestone Apr 7, 2016
@johann8384 johann8384 self-assigned this Apr 7, 2016
stromnet added a commit to stromnet/opentsdb that referenced this issue Apr 16, 2016
Removes old dead code trying to use bad_percent property
@stromnet
Copy link
Contributor Author

Fix available in PR #776

johann8384 pushed a commit that referenced this issue Apr 18, 2016
Removes old dead code trying to use bad_percent property

check_tsd: add support for new aggregators
check_tsd: add support for -N <utc> for testing at a specific timestamp
check_tsd: let verbose datapoints log indicate if value is ignored

Also break early, relevant when running with -N <utc> mode
johann8384 added a commit that referenced this issue May 24, 2016
check_tsd: unbreak #760, Rebase of #776
johann8384 pushed a commit to johann8384/opentsdb that referenced this issue Dec 5, 2016
Removes old dead code trying to use bad_percent property

check_tsd: add support for new aggregators
check_tsd: add support for -N <utc> for testing at a specific timestamp
check_tsd: let verbose datapoints log indicate if value is ignored

Also break early, relevant when running with -N <utc> mode
@IDerr
Copy link

IDerr commented Jul 10, 2017

@manolama you can close this one, merged here : #779

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

No branches or pull requests

3 participants