Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

A

alexrhyshurn

@alexrhyshurn
Unfollow Follow
About
Posts
7
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • [SOLVED] format string in DCI Container not working
    A alexrhyshurn
    Support

    Hello,

    Thanks for all the feedback.

    My problem was (of course) entirely my mistake.

    I did not understand the difference between integer and Floating Point data type. An integer is just that, a whole number and so cannot get decimal places.

    So trying to use %.2f format string with integer cant work. I Changed my DCIs to Floating point, and now %.2f for 2 decimal places is working fine.

    Apologies to all.

    Alex


  • [SOLVED] format string in DCI Container not working
    A alexrhyshurn
    Support

    Hi,

    I am sorry I was not clear.

    The returned value for %s is, for example, 109.794250 plain and simple.

    In the format string I have put %s kW so giving the result of 109.794250 kW

    If I create a new DCI COntainer and leave the format string blank it returns: 109.794250
    If I create a new DCI COntainer and put %s in the format string it returns: 109.794250

    I can use any text around the %s such as Total Grid Power: %s kW which returns: Total Grid Power: 109.794250 kW

    What I want to do is take the result from %s and reduce it to two decimal places.

    So I don't think that its a string.

    Best regards,

    Alex


  • [SOLVED] format string in DCI Container not working
    A alexrhyshurn
    Support

    Hi,

    Thanks for the response.

    The DCI is a simple query an SNMP value (no transformations or anything) from a Schneider Powerlogic ION Power Meter, and the Map is a DCI Container, I have shown the raw value as well as some others with format string. I am aiming to get 2 deminal places precision.

    I should add, that the DCI containers shown with data are using %s

    Thanks,

    Alex


    LV0_Power_meter_DCI_Forum.png

    network_map_forum.png


  • [SOLVED] Networks Maps broke
    A alexrhyshurn
    Support

    Hi Victor,

    Thanks. That works.

    Alex


  • [SOLVED] Networks Maps broke
    A alexrhyshurn
    Support

    I think I have found the cause.

    When adding descriptions to the format string, I have some data that is a percentage, so I added:

    Total UPS Power: %s %

    Hoping to see:

    Total UPS Power: 47 %

    The second percentage mark causes the whole map to break, and I have to delete it and make a new one.

    Can anybody guide me on how to include a second % sign?

    Thanks,

    Alex


  • [SOLVED] Networks Maps broke
    A alexrhyshurn
    Support

    Hi All,

    I was happily working on my network map, and then I added a new DCI COntainer with two DCIs and it worked fine. I went back to add some text to the Format String, and now the Map is broken with the error below.

    What happened?

    Could not create the view: 34

    java.lang.ArrayIndexOutOfBoundsException: 34
        at org.netxms.client.datacollection.DataFormatter.format(DataFormatter.java:80)
        at org.netxms.client.datacollection.DciValue.format(DciValue.java:110)
        at org.netxms.ui.eclipse.networkmaps.views.helpers.LinkDciValueProvider.getDciDataAsString(LinkDciValueProvider.java:268)
        at org.netxms.ui.eclipse.networkmaps.views.helpers.DCIContainerFigure.<init>(DCIContainerFigure.java:56)
        at org.netxms.ui.eclipse.networkmaps.views.helpers.MapLabelProvider.getFigure(MapLabelProvider.java:292)
        at org.netxms.ui.eclipse.networkmaps.views.helpers.ExtendedGraphViewer.inputChanged(ExtendedGraphViewer.java:280)
        at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:280)
        at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1690)
        at org.netxms.ui.eclipse.networkmaps.views.AbstractNetworkMapView.refreshMap(AbstractNetworkMapView.java:419)
        at org.netxms.ui.eclipse.networkmaps.views.AbstractNetworkMapView.createPartControl(AbstractNetworkMapView.java:390)
        at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:386)
        at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:240)
        at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
        at org.eclipse.ui.internal.Perspective.showView(Perspective.java:2245)
        at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1154)
        at org.eclipse.ui.internal.WorkbenchPage$20.run(WorkbenchPage.java:3934)
        at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
        at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3931)
        at org.netxms.ui.eclipse.networkmaps.NetworkMapOpenHandler.openObject(NetworkMapOpenHandler.java:33)
        at org.netxms.ui.eclipse.objectbrowser.api.ObjectOpenHandlerRegistry.callOpenObjectHandler(ObjectOpenHandlerRegistry.java:58)
        at org.netxms.ui.eclipse.objectbrowser.views.ObjectBrowser$1.openObject(ObjectBrowser.java:229)
        at org.netxms.ui.eclipse.objectbrowser.widgets.ObjectTree.openObject(ObjectTree.java:700)
        at org.netxms.ui.eclipse.objectbrowser.widgets.ObjectTree.access$4(ObjectTree.java:697)
        at org.netxms.ui.eclipse.objectbrowser.widgets.ObjectTree$4.doubleClick(ObjectTree.java:168)
        at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:845)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
        at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
        at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:843)
        at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1477)
        at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1246)
        at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:249)
        at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:246)
        at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:307)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1276)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3562)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3186)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
        at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at org.netxms.ui.eclipse.console.Application.start(Application.java:37)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1414)


  • [SOLVED] format string in DCI Container not working
    A alexrhyshurn
    Support

    Hello,

    This is my first post, so I hope I am clear.

    I having problems with formatting the DCI Containers on a network map. Running NetXMS 2.2.10 on Ubuntu.

    I am reading these:

    1. https://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax
    2. https://track.radensolutions.com/issue/NX-501
    3. https://www.netxms.org/documentation/adminguide/visualisation.html?highlight=visual

    It seems that most common formatters would include:
        %s - insert a string
        %d - insert a signed integer (decimal)
        %f - insert a real number, standard notation

    And we can see from the documentation:

    For each Data Source can be configured: Data collection item, name, format string(like “Text: %.4f”), in case of table DCI also column and instance

    So, my problem is that if I select a DCI, the Map displays the integer with 6 decimal places, and I want to reduce that to two. However ANY format string items do not work.

    E.g. putting the suggested %.4f returns an <INVALID FORMAT> (%.4f), using %d returns the same. Switching the DCI itself between string and integer makes no difference.

    Please can somebody help me understand what I an doing wrong?

    Many thanks.

    Alex

  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups