What's new

Help: Run scripts on AI Mesh node

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

CaptnDanLKW

Senior Member
I have 2 RT-AC86Us both running 384.18. On my main router I'm running syslog-ng and have enabled it to listen remotely,

On the remote node I have to manually set nvram "log_ipaddr=192.168.1.1" and restart syslogd after each reboot since this value is not retained, which is my problem.

I was thinking, since the remote node is running merlin, is there a command line way to enable script processing (since the UI is unavailable)? Assuming this would work, which script would be the best for this? I'm thinking service-start... that way if an AI Mesh property changes something that clobbers the value it can be set back automatically.

FYI - I do this to mostly capture roamastd and wlceventd events (helps troubleshoot roaming clients and SmartConnect steering) and the occasional thermal warning since the remote node sits in a hot shed.
 
I have 2 RT-AC86Us both running 384.18. On my main router I'm running syslog-ng and have enabled it to listen remotely,

On the remote node I have to manually set nvram "log_ipaddr=192.168.1.1" and restart syslogd after each reboot since this value is not retained, which is my problem.

How did you enable syslog-ng to listen remotely?
 
Are you running
Code:
nvram commit
afterwards?
Yes, but it must be getting overwritten by the AI Mesh sync code (called at node reboot, or a change on the primary).
I assume that when a change is made on the primary node that is something that the mesh code (AMAS?) knows it needs to keep in sync, a static config 'blob' (not a delta) is sent down to all the nodes, overwriting even settings that are not necessarily related to AI mesh functionality.
 
I have been digging into this as I would like to do the same thing. It looks like I may need to install scribe using amtm on the node and edit the config to send logging to my main router. That may solve the nvram issue.
 
How did you enable syslog-ng to listen remotely?
Check out /opt/share/syslog-ng/examples
You need to enable one of two types of processing methods (but not both) but HOW (and when) each facility is processed logged (and where) is more complicated. There are a lot better resources out there than anything I can type up but it basically comes down to filter first, then process (i.e. log) or process everything and filter later. Get some coffee, read the READMES, enable some of the pre-canned examples included in the directory to see how to carve up sections in the full log, into their own log files. Once you get a hang of how that works, THEN step into enabling remote logging and it should make more sense how to redirect them to their own log files.
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top