diff options
author | Jan Kunz <10615904+jkpit@users.noreply.github.com> | 2018-09-20 00:11:45 +0200 |
---|---|---|
committer | Costa Tsaousis <costa@tsaousis.gr> | 2018-09-20 01:11:45 +0300 |
commit | 5271e5b38f303bd14ebf4530c21570f80adbbff7 (patch) | |
tree | 49efa85dfd66beee059ad516b9ec414965901efb /python.d | |
parent | e6c118d2604e0ad032dafdc8bc37fd441507696f (diff) |
Disable IPFS Pin API (#4224)
* Disable Pin API
Disabling pin api due to ipfs performance issues with larger object Storage.
Propable fix for #3156 while ipfs has not solved this issue (go-ipfs issue #3874)
* Disable IPFS Pin API (#1)
* Disable IPFS pin api by default
Disabling pin api by default due to ipfs performance issues with larger object Storage.
Propable fix for #3156 while ipfs has not solved this issue (go-ipfs issue #3874)
* Disable IPFS pin api by default
Disabling pin api by default due to ipfs performance issues with larger object Storage.
Propable fix for #3156 while ipfs has not solved this issue (go-ipfs issue #3874)
* Added Bug Link
* changed pinapi Type to bool
* changed pinapi Type to bool
* changed pinapi Type to bool
* load pinapi value correctly from conf file
* move pinapi setting to correct location
* modified bool style
Diffstat (limited to 'python.d')
-rw-r--r-- | python.d/ipfs.chart.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/python.d/ipfs.chart.py b/python.d/ipfs.chart.py index e17ff7dee0..955e9c643f 100644 --- a/python.d/ipfs.chart.py +++ b/python.d/ipfs.chart.py @@ -61,6 +61,7 @@ class Service(UrlService): self.order = ORDER self.definitions = CHARTS self.__storage_max = None + self.do_pinapi = self.configuration.get('pinapi') def _get_json(self, sub_url): """ @@ -110,9 +111,12 @@ class Service(UrlService): [('peers', 'Peers', len)], '/api/v0/stats/repo': [('size', 'RepoSize', int), ('objects', 'NumObjects', int), ('avail', 'StorageMax', self._storagemax)], - '/api/v0/pin/ls': - [('pinned', 'Keys', len), ('recursive_pins', 'Keys', self._recursive_pins)] } + if self.do_pinapi: + cfg.update({ + '/api/v0/pin/ls': + [('pinned', 'Keys', len), ('recursive_pins', 'Keys', self._recursive_pins)] + }) r = dict() for suburl in cfg: in_json = self._get_json(suburl) |