Combined Network of MR33 and MX65... I have multiple networks and I'd like to know if I can reboot a

BradHewitt
Here to help

Combined Network of MR33 and MX65... I have multiple networks and I'd like to know if I can reboot a

I have 17 (at present) remote sites with this equipment setup as combined networks.

 

It would be beneficial to know if it is possible to reboot all of them at once on a Sunday so they will be ready to use the following Monday.

 

Thanks

11 Replies 11
BrechtSchamp
Kind of a big deal

Why do you want to reboot them? This usually isn't necessary for normal operation?

 

You can't do this via the dashboard.

 

You could script it using the dashboard api though. But you'd have to do it in a smart way with regards to the order. 

 

HTTP REQUEST

POST /networks/{networkId}/devices/{serial}/reboot

 

BradHewitt
Here to help

Why do you want to reboot them? I have 17 remote sites that use the data solely for construction purposes. We get our data from a cellular modem that is attached to the SD which gives the APs to the site.

 

You can't do this via the dashboard. I can reboot the MX65 individually but I am looking for a solution to reboot all of the combined networks.

 

You could script it using the dashboard api though. That would be ideal but I'm not a Cisco engineer but if a tested script is available and it isn't too difficult to setup I will try it.

BrechtSchamp
Kind of a big deal


@BradHewitt wrote:

Why do you want to reboot them? I have 17 remote sites that use the data solely for construction purposes. We get our data from a cellular modem that is attached to the SD which gives the APs to the site.

 

You can't do this via the dashboard. I can reboot the MX65 individually but I am looking for a solution to reboot all of the combined networks.

 

You could script it using the dashboard api though. That would be ideal but I'm not a Cisco engineer but if a tested script is available and it isn't too difficult to setup I will try it.


Yeah individually works. I meant all at once is not possible via dashboard. 

 

It's still not clear to me why you want to reboot them. 

BradHewitt
Here to help

I do appreciate that you are replying to my questions however asking "why" is not appropriate and hardly gets me closer to a solution.

 

If you do not know or cannot refer me to another individual / site I'll look to the rest of the community for some input.

 

Salutations

vassallon
Kind of a big deal

Asking why, is trying to help. @BrechtSchamp is trying to determine what the case for rebooting is as most networking devices should not need to be rebooted unless there is a networking issue. 

 

By determining what the driving factor is for rebooting, the community can help you determine the best way to help you problem solve your issue. 

Found this helpful? Give me some Kudos! (click on the little up-arrow below)
BradHewitt
Here to help

@vassallon and @BrechtSchamp 

 

I had said earlier that our source of data on each site are from cellular devices.  These are not professional modems and this equipment needs to be rebooted after being used all week.  This kind of gear requires a reboot to purge cached information.

 

So.  A reboot on each site will not only make the quality better for workers on site the data will be sent quicker AND there will be less technical support (at least in the short term).

 

I hope that supplies an answer.

 

So...any thoughts?

jdsilva
Kind of a big deal

@BradHewitt unfortunately @BrechtSchamp outlined the only real solutions you have available. You can either do it manually one device at a time through the dashboard, or you can write a script to do it through the API. Meraki does not create official, sanctioned scripts to do specific tasks. You may find other folks who have created stuff, and made it available online in places like Github, but that's going to be the extent of that. 

 

There aren't any other alternatives to this problem. 😞

BradHewitt
Here to help

@jdsilva 

 

Appreciated.  Doing 17 networks isn't a big deal BUT we are growing and it would have been a good to know in the immediate if there are more automated option.

 

Thanks to @vassallon and @BrechtSchamp for their contribution all the same.

 

vassallon
Kind of a big deal

@BradHewitt Yes, this make perfect sense as to the reason why you want to do this. Ideally you'd like to have it scheduled in some capacity but unfortunately there is no way to do this within the Dashboard at this time. 

 

I would make a wish for this feature request but until Meraki can develop it your only way to do it is through scripting which you could make automated to reboot these devices for you. I unfortunately have not played around enough with the API to assist in any way.

Found this helpful? Give me some Kudos! (click on the little up-arrow below)
BrechtSchamp
Kind of a big deal

I understand that sometimes intentions get lost in translation in online written media. But my intention was indeed to help, not to sound like a pedantic d*. The reason I want to understand why the reboot is needed is to see if there is another possible solution that may be better.

 

Now that you've explained why the reboot is needed we can try to understand better. You say the problem lies with the cellular connection. Does that mean a USB modem that is in the MX's USB port? If it is then I can understand a reboot of the MX may help as the modem will then reboot with the MX. If not, I'm not sure if it's going to do much. Same goes for the access points.

 

I've started writing a script for you using the new Python SDK. It goes as follows:

from meraki.meraki import Meraki

# user API key
x_cisco_meraki_api_key = 'enter_your_API_key_here'


try:
    client = Meraki(x_cisco_meraki_api_key)

    # get a list of organizations the user has access to
    orgs = client.organizations.get_organizations()

    # prepare the orgcollect to be used in the get_organization_networks call
    orgcollect = {}

    for org in orgs:
        # only interested in a specific organization
        if org['id'] == 1234567: #  your organization's ID
            orgcollect['organization_id'] = org['id']

    # fetch all networks in the organization(s)
    if orgcollect:  # make sure it's not an empty collection
        networks = client.networks.get_organization_networks(orgcollect)

        # loop over the networks
        if networks:  # make sure it's not an empty organization
            for network in networks:

                # create a devicescontroller to fetch devices
                devicescontroller = client.devices

                # fetch a list of devices in the specified network
                devices = devicescontroller.get_network_devices(network['id'])

                # prepare the devicescollection to reboot them
                devicescollect = {}

                for device in devices:

                    # only interested in MX devices
                    if 'MX' in device['model']:
                        devicescollect['serial'] = device['serial']
                        devicescollect['network_id'] = network['id']

                    # reboot the device
                    if devicescollect:  # make sure there are devices to reboot
                        result = devicescontroller.reboot_network_device(devicescollect)

                        if result['success']:
                            print("The device with the name ", device['name'], "(", device['model'],
                                  ") in the network ", network['name'], " was successfully rebooted.")
                        else:
                            print("ERROR: The device with the name ", device['name'], "(", device['model'],
                                  ") in the network ", network['name'], " could not be rebooted.")
        else:
            print("Empty Organization")
    else:
        print("No organizations selected")
except:
    print("Exception occurred, possibly and invalid API key.")

I have tested the script, but not thoroughly so all use is at your own risk.

 

A couple of things you should know about the script:

  • I assume only the MX's need to be rebooted, so I filter on the model number containing MX
  • I assume all devices that need the reboot are in a single organization, you need to fill in its ID in the code
  • Make sure the computer you execute the script from is not behind one of the MX's that's getting a reboot or that will cause issues.
  • More info about the Python SDK and how to install it here: https://developer.cisco.com/meraki/api/#/python/getting-started/what-can-the-api-be-used-for

Hope that helps.

BradHewitt
Here to help

Hi there.
 
The cellular device connects to the "Internet" port via a Ethernet cable and I've configured DMZ and MAC address specifics on the device so others cannot simply plug into one of the other ports to bypass security.
 
I instruct the staff on site to reboot the entire package to be certain.  People that use these services have a wild range of technical expertise so I find the "comfort zone" with each site.
 
Yes each network has been configured under a template composed of a MX65 and a MR33.
 
Each site is accessed remotely via the webpage interface.
 
Thanks for the help and yes I misinterpreted your intent.
Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.
Labels