Help: Run scripts on AI Mesh node

  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

CaptnDanLKW

Regular Contributor
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.
 

Jack Yaz

Part of the Furniture
Are you running
Code:
nvram commit
afterwards?
 

Smokey613

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.
How did you enable syslog-ng to listen remotely?
 

CaptnDanLKW

Regular Contributor
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.
 

Smokey613

Senior Member
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.
 

CaptnDanLKW

Regular Contributor
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.
 

Similar threads

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