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

ParseError #21

Open
akrzos opened this issue Jun 27, 2017 · 2 comments
Open

ParseError #21

akrzos opened this issue Jun 27, 2017 · 2 comments

Comments

@akrzos
Copy link
Contributor

akrzos commented Jun 27, 2017

I have now seen this occur "randomly". If I find any further details on how this occurs I'll post back to this issue.

[2017-06-27 17:13:39] [error] Unhandled python exception in read callback: ParseError: Unknown input format: ''
[2017-06-27 17:13:39] [error] Traceback (most recent call last):
[2017-06-27 17:13:39] [error]   File "/usr/local/bin/collectd_iostat_python.py", line 328, in read_callback
    ds = iostat.get_diskstats()
[2017-06-27 17:13:39] [error]   File "/usr/local/bin/collectd_iostat_python.py", line 184, in get_diskstats
    eds = self.parse_diskstats(edd)
[2017-06-27 17:13:39] [error]   File "/usr/local/bin/collectd_iostat_python.py", line 101, in parse_diskstats
    raise ParseError('Unknown input format: %r' % input)
[2017-06-27 17:13:39] [error] ParseError: Unknown input format: ''

Also this one:

[2017-06-26 19:11:41] [error]   File "/usr/local/bin/collectd_iostat_python.py", line 328, in read_callback
    ds = iostat.get_diskstats()
[2017-06-26 19:11:41] [error]   File "/usr/local/bin/collectd_iostat_python.py", line 181, in get_diskstats
    dsd = self._get_childs_data(dstats)
[2017-06-26 19:11:41] [error]   File "/usr/local/bin/collectd_iostat_python.py", line 157, in _get_childs_data
    (stdout, stderr) = child.communicate()
[2017-06-26 19:11:41] [error]   File "/usr/lib64/python2.7/subprocess.py", line 793, in communicate
    self.stdout.close()
[2017-06-26 19:11:41] [error] IOError: [Errno 9] Bad file descriptor
@deniszh
Copy link
Owner

deniszh commented Jun 27, 2017

Looks like sometimes running of 'iostat' command on your machine returns error or some garbage.
What's your OS and Interval / Count parameters?

@akrzos
Copy link
Contributor Author

akrzos commented Jun 27, 2017

What's your OS and Interval / Count parameters?

RHEL 7.3

Collectd interval (global and plugin) of 10s with iostat interval of 2s

Example of my configuration for the iostat plugin:

<Plugin python>
  ModulePath "/usr/local/bin/"
  Import "collectd_iostat_python"

  <Module collectd_iostat_python>
    Path "/usr/bin/iostat"
    Interval 10
    IostatInterval 2
    Count 2
    Verbose false
    NiceNames false
    PluginName collectd_iostat_python
  </Module>
</Plugin>

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

2 participants