Best Practices and Troubleshooting
Follow the steps below to check if your workflow is running correctly before scaling up to automate or integrate for your purposes.
1. Check license for nTop Automate
You can do this by typing ntopcl in the command line. If it prints the command nTopCL command menu, then you are good to go. Otherwise, see our troubleshooting tip below.
2. Prepare nTop Notebook for nTop Automate
Follow our recommendations in the “Preparing Your Notebook” lesson.
3. Generate JSON templates
> ntopcl -t notebook.ntop
4. Modify input_template.json and check if it runs correctly with the verbose setting
> ntopcl -v2 -j input_template.json -o output.json notebook.ntop
5. Check the output results and troubleshoot as needed
Open up your output.json file and compare the values with the values of the output variable in the Notebook on the GUI with the same inputs. See our troubleshooting tips below on Input Issue.
Troubleshooting
Keep in mind that example scripts may not run depending on your environment. Here are some troubleshooting tips to help you work through some of the issues you could run into.
License Issue
If you are not logged in, not using a valid local license, and cannot make a new connection to our cloud license server, you may have trouble running nTop Automate. In such cases, try using this expression, along with any other expressions that you need to execute your Notebook, to log in through nTop Automate:
> ntopcl -v2 -u id@email.com -w yourpassword notebook.ntop
Check if the return messages are printed as follows:
13:35:56 [I]: Login successful 13:36:00 [I]: Notebook started 13:36:09 [I]: nTop successfully built. 13:36:10 [I]: Logout successful
Error Messages
If you find that the error messages don’t help you figure out what the problem is, turn on -v2 verbose setting by including it in your command:
> ntopcl -v2 -j input.json -o output.json notebook.ntop
This gives you the timing of the entire run in the sequence of how the CPU takes in and executes your Notebook and allows you to see when and around which blocks you are getting an error so you can go back to your Notebook and find the source of the problem.
Input Issue
If you suspect that your inputs are not passing through, try running the command with the GUI to see if the input variables load without an error. Alternatively, you can use -s to save the ntopcl results with cache in the Notebook and the file in the nTop GUI.
To check in the GUI:
> ntop -v2 -j input.json -o output.json notebook.ntop
To save and cache:
> ntopcl -v2 -s -j input.json -o output.json notebook.ntop
