Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Bob_Zimmerman
MVP Gold
MVP Gold

Where to Store Custom Metric Files?

Building a custom metric for Skyline takes making a JSON file describing the metric, and some way to emit JSON data for the metric. For emitting the data, I'm using a shell script. Once I add the metric, Skyline moves my script to /var/log/CPotlpAgent/backup/scripts/.

What about the JSON description file? Do we need to keep it on the system? If so, is there a particular place we should store it?

What's the right way to roll out a new version of the metric script? Should we just overwrite the file in /var/log/CPotlpAgent/backup/scripts/, or should we remove the metric and add it again?

0 Kudos
3 Replies
Vincent_Bacher
MVP Silver
MVP Silver

During my last tests i experienced that after adding the custom script, the json file is no longer required and i would definitely prefer to remove the metric and add it again once i make some modifications.

and now to something completely different - CCVS, CCAS, CCTE, CCCS, CCSM elite
Elad_Chomsky
Employee
Employee

Hi @Bob_Zimmerman ,

1) The JSON is needed only once to set the relevant instrument configuration

2) Going forward, the recommended approach is to work on /var/log/CPotlpAgent/backup/scripts/,  it is simply moved there to persist upgrade operations, you can delete and re-add - but there is no need. 

0 Kudos
Bob_Zimmerman
MVP Gold
MVP Gold

Can we put the script directly into /var/log/CPotlpAgent/backup/scripts/ from the start? I understand simply having the script there isn't enough, but is it safe to add them from there? It so, that would make deployment a little easier. Just rsync the custom metrics from some repository to there, and run the command to add them. If the system already has the custom metrics, it now has the latest version. If it didn't, they get added.

Is it safe to add a cache directory under there? For example, I want to add a metric for the installed jumbo. That's relatively expensive to get, and it changes infrequently, so I want to cache it and return the cached value. I can just throw it in /tmp or something, but it would be nice for clarity to be able to keep the cache with the scripts.

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events