I'm making a php monitor the status of our Netonix switches.
I want to pull off uptime, CPU, memory, Firmware Version, Thermal and Power statistics.
Is there an API string that will pull this information?
I have tried a few random things like
http://netonix/api/v1/status
http://netonix/api/v1/system
http://netonix/api/v1/info
API string for status
- NetonixUser
- Member
- Posts: 7
- Joined: Wed Oct 19, 2016 8:51 am
- Has thanked: 0 time
- Been thanked: 1 time
-
sirhc - Employee
- Posts: 7422
- Joined: Tue Apr 08, 2014 3:48 pm
- Location: Lancaster, PA
- Has thanked: 1609 times
- Been thanked: 1326 times
Re: API string for status
Support is handled on the Forums not in Emails and PMs.
Before you ask a question use the Search function to see it has been answered before.
To do an Advanced Search click the magnifying glass in the Search Box.
To upload pictures click the Upload attachment link below the BLUE SUBMIT BUTTON.
Before you ask a question use the Search function to see it has been answered before.
To do an Advanced Search click the magnifying glass in the Search Box.
To upload pictures click the Upload attachment link below the BLUE SUBMIT BUTTON.
- NetonixUser
- Member
- Posts: 7
- Joined: Wed Oct 19, 2016 8:51 am
- Has thanked: 0 time
- Been thanked: 1 time
Re: API string for status
Thanks but we have a large PHP platform which we developed that manages hundreds of different devices and brands and this information we want to add to our existing system.
-
sirhc - Employee
- Posts: 7422
- Joined: Tue Apr 08, 2014 3:48 pm
- Location: Lancaster, PA
- Has thanked: 1609 times
- Been thanked: 1326 times
Re: API string for status
Well you do realize the CPU has nothing to do with switch capacity or load?
The CPU runs the UI/CLI to configure the core as well as Stats/SNMP/Daemons and such.
The memory you see also has nothing to do with buffers but rather once again the memory used by the MIPs 24K to run the UI/CLI and such.
The packet forwarding is handled in the switch core which can deliver line speed on all ports at the same time.
Eric will have to answer you on the API call but I think if you do a search on the forums this has been discussed before?
Here are a few posts that came up in a basic search:
viewtopic.php?f=17&t=2364&p=16666&hilit=API#p16666
viewtopic.php?f=6&t=1549&p=16045&hilit=API#p16045
viewtopic.php?f=6&t=1549&p=16022&hilit=API#p16022
viewtopic.php?f=6&t=2216&p=15787&hilit=API#p15787
The CPU runs the UI/CLI to configure the core as well as Stats/SNMP/Daemons and such.
The memory you see also has nothing to do with buffers but rather once again the memory used by the MIPs 24K to run the UI/CLI and such.
The packet forwarding is handled in the switch core which can deliver line speed on all ports at the same time.
Eric will have to answer you on the API call but I think if you do a search on the forums this has been discussed before?
Here are a few posts that came up in a basic search:
viewtopic.php?f=17&t=2364&p=16666&hilit=API#p16666
viewtopic.php?f=6&t=1549&p=16045&hilit=API#p16045
viewtopic.php?f=6&t=1549&p=16022&hilit=API#p16022
viewtopic.php?f=6&t=2216&p=15787&hilit=API#p15787
Support is handled on the Forums not in Emails and PMs.
Before you ask a question use the Search function to see it has been answered before.
To do an Advanced Search click the magnifying glass in the Search Box.
To upload pictures click the Upload attachment link below the BLUE SUBMIT BUTTON.
Before you ask a question use the Search function to see it has been answered before.
To do an Advanced Search click the magnifying glass in the Search Box.
To upload pictures click the Upload attachment link below the BLUE SUBMIT BUTTON.
-
Eric Stern - Employee
- Posts: 532
- Joined: Wed Apr 09, 2014 9:41 pm
- Location: Toronto, Ontario
- Has thanked: 0 time
- Been thanked: 130 times
Re: API string for status
Since you are using PHP this post will show the basics: viewtopic.php?f=6&t=2216&p=15787&hilit=API#p15787
Once you have the session cookie you will need to call /api/v1/bootid, which will return something like this:
Then, using the bootid you got above you can call /api/v1/status/30sec?<bootid>, which will return a ton of information that should include everything you are looking for.
You only need to get the bootid once, it will remain valid until the switch is rebooted. If you call /api/v1/status/30sec with an invalid bootid you will only get "Uptime: 0" as a response.
Once you have the session cookie you will need to call /api/v1/bootid, which will return something like this:
- Code: Select all
{
"result": "Ok",
"BootID": "JfljqEx1Vu1l57DbITFhfJtqT2wzB98W",
"Verified": false
}
Then, using the bootid you got above you can call /api/v1/status/30sec?<bootid>, which will return a ton of information that should include everything you are looking for.
You only need to get the bootid once, it will remain valid until the switch is rebooted. If you call /api/v1/status/30sec with an invalid bootid you will only get "Uptime: 0" as a response.
- NetonixUser
- Member
- Posts: 7
- Joined: Wed Oct 19, 2016 8:51 am
- Has thanked: 0 time
- Been thanked: 1 time
Re: API string for status
You are a genious thank you, it's working perfectly
6 posts
Page 1 of 1
Who is online
Users browsing this forum: No registered users and 106 guests