Community discussions

MikroTik App
 
gr8boy
just joined
Topic Author
Posts: 6
Joined: Thu Nov 04, 2010 2:39 pm

Remove some SNMP info from devices

Thu Nov 04, 2010 3:20 pm

Hey!

In my network map i have several Windows Servers with SNMP running.
I can see cpu, mem, virt mem, disk... but i DONT want to see virt mem... how do i remove that info....is it possible????

Check the attach if you dont understand my question.
You do not have the required permissions to view the files attached to this post.
 
chrisd13
Frequent Visitor
Frequent Visitor
Posts: 68
Joined: Mon Feb 20, 2006 4:05 pm
Location: UK

Re: Remove some SNMP info from devices

Thu Nov 04, 2010 5:50 pm

The default info uses the device_performance() function which uses the cpu_mem_disk() function, which in turn uses the virtual_mem_usage() function. You could copy the cpu_mem_disk() function and remove the part which uses the virtual_mem_usage() function. I did it like this...

removal_vmem_test function
concatenate(
if(cpu_usage_available(), concatenate("cpu: ", cpu_usage(), "% "), ""),
if(mem_usage() > 0, concatenate("mem: ", round(mem_usage()), "% "), ""),
if(hdd_usage() > 0, concatenate("disk: ", round(hdd_usage()), "% "), "")
)
device_performance_no_vmem function
if(
string_size(removal_vmem_test()) > 0,

concatenate(removal_vmem_test(), "
"),

""
)
On the device's appearence window edit the entry in the label field and replace device_performance() with device_performance_no_vmem() (or whatever you devide to call the function) and that should do it.
 
gr8boy
just joined
Topic Author
Posts: 6
Joined: Thu Nov 04, 2010 2:39 pm

Re: Remove some SNMP info from devices

Fri Nov 05, 2010 9:56 am

Yes it worked!! Thanks!

I had no idea that label field was the answer for this.

One more question if its ok... the disk size must be the total size of all the partitions? is it possible to modify another function just to see C:\ or D:\ ???
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: Remove some SNMP info from devices

Fri Nov 05, 2010 3:21 pm

Yes there is a complex disk probe in the probe thread. Think it is on page 3.
 
PontiacCZ
just joined
Posts: 10
Joined: Tue Nov 09, 2010 2:29 pm

Re: Remove some SNMP info from devices

Tue Nov 09, 2010 2:49 pm

I'd like to refresh this thread.

Now we know how to customize label on a particular device ALREADY in a map. But how to make it default so that newly discovered devices automatically get this improved label?
 
PontiacCZ
just joined
Posts: 10
Joined: Tue Nov 09, 2010 2:29 pm

Re: Remove some SNMP info from devices

Tue Nov 09, 2010 4:33 pm

OK, here is an answer to my previous question: :)
The default label setup is located in Settings of the main window -> Map -> section Device Appearance -> Label.

Who is online

Users browsing this forum: No registered users and 4 guests