Discussion:
Rename graphpoint via API?
omeganon
2011-11-28 21:50:13 UTC
Permalink
omeganon [http://community.zenoss.org/people/omeganon] created the discussion

"Rename graphpoint via API?"

To view the discussion, visit: http://community.zenoss.org/message/62868#62868

--------------------------------------------------------------
Hi!

If I should post this elsewhere, please let me know.

I'm trying to discover how to rename graph points to friendlier names via the API. I haven't really used it before other than some hacking on other people scripts so I'm a n00b in that regard but I don't expect hand-holding.

I see how to add graphpoints with "addDataPointToGraph(self, dataPointUid, graphUid, includeThresholds=False)", but it uses the longer Datasource.datapoint naming convention in the graph. I want to change that to something more human friendly/descriptive.

I can do this in the UI by going to the graph definition -> Manage Graph Points > Edit Graph Point and change the Name, but I don't see a corresponding documented function in the API to do so. I fully expect that it's my unfamiliarity with the API or my search-fu that's the problem.

Can someone point me in the right direction?

Thanks!

--
Marc
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62868#62868]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
dpetzel
2011-11-28 22:05:47 UTC
Permalink
dpetzel [http://community.zenoss.org/people/dpetzel] created the discussion

"Re: Rename graphpoint via API?"

To view the discussion, visit: http://community.zenoss.org/message/62849#62849

--------------------------------------------------------------
Its been a little bit since I looked at this, but I think you want to leverage the setInfo method in the Template router (Assuming JSON api) and the newId keyword
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62849#62849]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
omeganon
2011-11-29 17:51:31 UTC
Permalink
omeganon [http://community.zenoss.org/people/omeganon] created the discussion

"Re: Rename graphpoint via API?"

To view the discussion, visit: http://community.zenoss.org/message/62885#62885

--------------------------------------------------------------
Thanks! That was what I needed =) Since I only had 3 specific things to change over a known set of graphs, I just used a RESTful call with curl passing the appropriate JSON.

Thanks for the pointer!
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62885#62885]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...