quentin-st / Freebox-OS-munin

Low depencendies Freebox OS munin plugin
GNU General Public License v2.0
17 stars 10 forks source link

NOT AN ISSUE #13

Closed airvb closed 5 years ago

airvb commented 6 years ago

Fiber is arrived

Is that possible to insert a module for fiber

http://mafreebox.freebox.fr/api/v4/connection/ftth/ give

{"success":true,"result":{"sfp_has_power_report":false,"sfp_has_signal":true,"sfp_model":"F-MDCONU3A","sfp_vendor":"FREEBOX","link":true,"sfp_alim_ok":true,"sfp_serial":"868802J18030","sfp_present":true}}

I think sfp_has_signal | true link | true sfp_alim_ok | true sfp_present | true

are the most interesting parameters to follow .

Thanks

quentin-st commented 6 years ago

Hi there!

Yup, that would be possible, I cannot currently test these though. These 4 graphs would track a value that would either be 0 or 1, right?

LudovicRousseau commented 5 years ago

The documentation says:

{
    "success": true,
    "result": {
        "sfp_has_power_report": true,
        "sfp_has_signal": false,
        "sfp_model": "SPBD-1250E4H2RDB",
        "sfp_vendor": "DELTA",
        "sfp_pwr_tx": -1172,
        "sfp_pwr_rx": -3698,
        "link": false,
        "sfp_alim_ok": true,
        "sfp_serial": "DE104900000471",
        "sfp_present": true
    }
}

But my freebox mini 4K with freebox OS 4.0.4 does not return the sfp_power_* fields. I only have:

{'sfp_has_power_report': False,
 'has_sfp': True,
 'sfp_model': 'F-MDCONU3A',
 'sfp_vendor': 'FREEBOX',
 'sfp_has_signal': True,
 'link': True,
 'sfp_alim_ok': True,
 'sfp_serial': '868802J183809108',
 'sfp_present': True}

I don't know if having the status true/false for the different fields is really interesting. What would it look like in munin?

quentin-st commented 5 years ago

I guess True/False values may be converted to 1/0, just like it's done for this graph:

airvb commented 5 years ago

Hello, The interest of this request is to have an alert in case of loose connection ON/OFF flag is ok for me

LudovicRousseau commented 5 years ago

I have a working code in https://github.com/LudovicRousseau/Freebox-OS-munin/commit/993d2a8afa74bf78a18b76cf551350b607795736

it looks like this capture d ecran 2019-01-30 a 18 19 53

airvb commented 5 years ago

Tested and adopted !

Thanks

titithebad commented 5 years ago

Hello,

How do I update the git depot on my RPi ?

quentin-st commented 5 years ago

@titithebad : we removed the freebox.json file from the repo, so here's how you can do:

cd Freebox-OS-munin
cp freebox.json freebox.json.bak # do a backup of your local freebox.json file
git checkout -- . # cancel changes
git pull # get latest changes
mv freebox.json.bak freebox.json # put back your freebox.json file
LudovicRousseau commented 5 years ago

I provide a solution in https://github.com/chteuchteu/Freebox-OS-munin/pull/22 This code has been merged and is now part of Freebox-OS-munin