NeDi Community

NeDi Software Specific => GUI => Topic started by: mathom on March 02, 2016, 11:02:49 AM

Title: Device-write automatic
Post by: mathom on March 02, 2016, 11:02:49 AM

I implement NeDi in company, it does great job I arrived to discovered all the network.
I discovered the power of Device-write.php and for company i need to get back some info about different switch. In device-write I do "show version" command and I get great info and log file in cli folder, the only thing I want to do is to do a script that do same thing automatically and everyday (send log file to ftp). I would know how to device-write work to modify it for my needs.

Sorry for my bad english.

Thanks for this tools

Title: Re: Device-write automatic
Post by: rickli on March 04, 2016, 02:11:16 PM
Tx for the feedback.  Let me start with a couple questions:

- Why do need "sh ver"?
- What are you missing in Device-Status (bootimage, type, SN and description should be there)?
- Why don't you configure NeDi as syslog server and have your devices log centrally?

Now the answer to your original question :-)

Try -c <cmdfile> to execute commands on devices (the output is written to the cli folder). You can even use mail alerting upon changes...
Title: Re: Device-write automatic
Post by: mathom on March 07, 2016, 08:33:02 AM
Hi rickli,

Thanks for answer.

I want to use this command to show stack on different device and see which one is the master of the stack and different other info only see with this command directly on device.

With your answer i have a another one, option -c work with other like -pob which I use now everyday with cron job ?

Again, sry for my english

Thanks again


EDIT: -c <cmdfile> -> what i wrote for cmdfile ? Device-Write or something else ?

EDIT again and answer if someone is interested :) :
-> create file "cmd_admin" in cli directory:
            write in this file: "show version"
-> ./ -pob -c cmd_admin

-> wait and see
PS: check directory right (ls -l and chown)

EDIT: again and again
I create a script that backup nedi database and modify the copy to create .csv backup with info I want, after that a Excel macro modify csv for better use. If you want it rickli I can send you that