-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem Using Groups #34
Comments
Was any resolution found to this? I am new to LibreNMS and Oxidized and tried to run a small set of commands using Oxidized-script against a group of devices. If I run it against a single device it work fine, but when I run it against the group I get the below debug output. If I run it with a single device: ~/.config/oxidized/oxs# oxs -x snmp_host_add 10.32.96.10 It just never seems to start the actual SSH process when I load the group vs a single host. |
So I figured this out. Turns out when LibreNMS pushes the groups to Oxidized it will only push the first group. For alerting I have a groups that includes all devices and for other reasons I have groups based on device.os. I was trying to push to all ironware devices by calling the ironware group, but when I checked the assigned groups in oxidized they were all assigned to the group that included all devices. I could see solving this by having multiple groups in LibreNMS that are pushed to oxidized and then just insuring those groups are all part of the Alert Rules. (This is a LibreNMS side fix). You could allow multiple groups in Oxidized, or you could allow oxs to call by device.os since the OS in oxidized is known.
It would be nice is oxs outputted a message that no devices matched group at the end. I'll keep digging but posting this to help others who may come across this post. |
I started using oxidized-scripts and it works awesome so thank you! when i try to run the script against all devices in my router.db file, it says that it loads all of the devices, but the command does not get sent to any of them.
[me@oxidized ~]# oxs --group ios 'sh run | include hostname'
I, [2019-07-12T07:25:39.425244 #31393] INFO -- : lib/oxidized/nodes.rb: Loading nodes
I, [2019-07-12T07:25:39.585747 #31393] INFO -- : lib/oxidized/nodes.rb: Loaded 52 nodes
[me@oxidized ~]#
When i list the nodes, they all show up
[me@oxidized ~]# oxs --list-nodes
I, [2019-07-12T07:26:34.893654 #32157] INFO -- : lib/oxidized/nodes.rb: Loading nodes
I, [2019-07-12T07:26:35.060313 #32157] INFO -- : lib/oxidized/nodes.rb: Loaded 52 nodes
10.9.101.2:
ip => 10.9.101.2
group =>
model => IOS
input => [Oxidized::SSH, Oxidized::Telnet]
output => Oxidized::Git
auth => {:username=>"oxidized", :password=>"Ox1d1z3d"}
prompt => (?-mix:^([\w.@()-]+[#>]\s?)$)
vars =>
stats => #Oxidized::Node::Stats:0x0000000002ca8df0
retry => 0
repo => /home/me/gitrepo.git
192.168.101.2:
ip => 192.168.101.2
group =>
model => IOS
input => [Oxidized::SSH, Oxidized::Telnet]
output => Oxidized::Git
auth => {:username=>"oxidized", :password=>"Ox1d1z3d"}
prompt => (?-mix:^([\w.@()-]+[#>]\s?)$)
vars =>
stats => #Oxidized::Node::Stats:0x0000000002cb1c98
retry => 0
repo => /home/me/gitrepo.git
Is there something wrong with my Syntax?
Thanks
The text was updated successfully, but these errors were encountered: