I'm currently learning NXSL to write scripts for executing ssh commands to nodes but have immediatelly run into issues that i'm unable to pinpoint the issue based on their documentation here:https://www.netxms.org/documentation/nxsl-latest/#_introduction
When I try to execute the code above, it says "Error 30 in line 9: Unknown object's method" claiming the executeSSHCommand method doesn't exist, yet based on Node documentation is does.
When commenting that line out and uncommenting line 8, it says the attribute doesn't exist.
However, in documentation, it does.
I'm unsure at this point if I'm missing something obvious syntactically or what.
Any help would be appreciated.
Code Select
1 sub main() {
2 node = Objects.FindNodeByIPAddress($1, null);
3
4 if (node == NULL) {
5 println("Error: node not found.");
6 }
7
8 //println(node->name);
9 println(node->executeSSHCommand("ip address print"));
10}
When I try to execute the code above, it says "Error 30 in line 9: Unknown object's method" claiming the executeSSHCommand method doesn't exist, yet based on Node documentation is does.
When commenting that line out and uncommenting line 8, it says the attribute doesn't exist.
However, in documentation, it does.
I'm unsure at this point if I'm missing something obvious syntactically or what.
Any help would be appreciated.