Accounting Portal API Function VO Admin Cloud

From EGIWiki
Revision as of 11:12, 7 August 2017 by Ivandiaz (talk | contribs) (Output Example)
Jump to: navigation, search

VO Admin Cloud API

This function returns admin restricted data from concrete VOs.

/vo_admin/cloud/<scope>/<vo>/<metric>/<row_variable>/<column_variable>/<start_date>/<end_date>/<output_format>

All parameters except scope can be omitted and defaults will be selected, but all of them will need to be included otherwise.

Scope

Mandatory attribute

Format:

<scope>

The Scope parameter limits the data that is displayed in the view to a concrete unit in a hierarchical organization.

Accepted Values for Scope Name Description
operation_centres Operations Centres All the HTC infrastructure by Operations Centre (NGI).
countries Countries All the HTC infrastructure by Country.
operation_centre/<operation_centre_name> Individual Operation Centre HTC accounting from a concrete Operations Centre (NGI).
country/<country_name> Individual Country HTC accounting from a concrete Country.
resource_centre/<resource_centre_name> Individual Resource Centre (Site). HTC accounting from a concrete Resource Centre (Site).

VO

Mandatory attribute

Format:

<vo>

The VO parameter determines the VO from which the data is displayed among those the user has permissions on.

Metric

Optional attribute

Format:

<metric>[-<metric_unit_suffix>]

The Row and Column variables define the dimensions in which the data are grouped, for each view usually the data are grouped bidimensionally using a row variable and a column variable, the name derived from appearing in the rows and columns of the table, respectively. These are the valid values for both of these: Metric values that are only useable in cloud views:

Accepted Values for Metric Name Description
number_of_virtual_machines Number of Virtual Machines Number of VM instances running in the selected time period.
sum_elapsed Sum Wall hours (Elapsed time) Hours of wall-clock time consumed by jobs, including I/O, OS and other housekeeping tasks, multiplied by the number of logical cores used by each job..
sum_elapsed_times_number_of_processors Sum Elapsed * Number of Processors Hours of wall-clock time consumed by jobs, including I/O, OS and other housekeeping tasks, multiplied by the number of logical cores used by each job..
inbound_network_traffic Inbound Network Traffic Inbound network traffic in bytes towards running VM instances.
outbound_network_traffic Outbound Network Traffic Outcoming network traffic in bytes from running VM instances.
memory_used Memory Used Amount of memory in  bytes allocated by running VM instances.
disk_used Disk Used Amount of storage in bytes allocated by running VMs instances.

Metric Unit Suffix

For all metrics with a unit based on hours, there is an optional suffix to indicate a longer time unit, the basic format is

<metric>[-<metric_unit_suffix>]

For example:

normcpu-month

If no suffix is indicated, hours are selected by default:

Accepted Values for Suffix Name Description
hour Hours Select the default unit of hours, equivalent to not indicating any suffix.
day Days Select a time of unit based on days (24 hours)
month Months Select a time of unit based on months (720 hours)
quarter Quarters Select a time of unit based on quarters (2160 hours)
halfyear Half Years Select a time of unit based on half years (4320 hours)
year Years Select a time of unit based on years (8640 hours)


Row and Column Variables

Format:

<row_variable>/<column_variable>

Optional attribute

The Row and Column varaibles define the dimensions in which the data is grouped, for each view usually the data is grouped bidimensionally using a row variable and a column variable, the name derived from appearing in the rows and columns of the table, respectively. These are the valid values for both of these:

Accepted Values for Variable Name Description
DATE Month Grouping by Month
Year Year Grouping by Year
3M Quarter Grouping by Quarter
6M Half-year Grouping by Half-year
VO VO Grouping by VO
RESOURCE_CENTRE SITE Group by Resource Centre
NUMBER PROCESSORS Number of Processors Group by the number of Logical Cores.
NODECOUNT Nodes Group by Nodes
UserDN User DN Grouping by UserDN
UserRole User Role Grouping by User Role


Dates

Optional attribute

Format:

/StartYear/StartMonth/EndYear/EndMonth/

The date format is:

/YYYY/MM/YYYY/MM/

The date indicated by StartYear/StartMonth needs to be BEFORE EndYear/EndMonth.

Data Selector

Optional attribute

Accepted Values for Data Selector Meaning
/JSON/ Returns data as JSON (Java Script Object Notation) data.
/CSV/ Returns data as CSV (Comma Separated Values) data.

Returns

In case of success: 200 OK HTTP Code and output.

In case of error: [HTTP Error Code]

Output Example

https://accounting-pre.egi.cesga.es/site_admin/CESGA/njobs/VO/DATE/2016/6/2017/6/CSV/
[{"2016-06":0,"2016-07":0,"2016-08":0,"2016-09":0,"2016-10":0,"2016-11":0,"2016-12":6,"2017-01":0,"2017-02":0,"id":"auger","Total":6,"Percent":0}, {"2016-06":35731,"2016-07":14577,"2016-08":33488,"2016-
09":6538,"2016-10":3504,"2016-11":4992,"2016-12":8255,"2017-01":2364,"2017-02":927,"id":"biomed","Total":110376,"Percent":64.23}, {"2016-06":1783,"2016-07":1866,"2016-08":3125,"2016-09":2606,"2016-10":3017,"2016-
11":972,"2016-12":3959,"2017-01":6320,"2017-02":1737,"id":"compchem","Total":25385,"Percent":14.77}, {"2016-06":6804,"2016-07":5990,"2016-08":4928,"2016-09":3290,"2016-10":3318,"2016-11":3249,"2016-12":3312,"2017-
01":3289,"2017-02":1848,"id":"ops","Total":36028,"Percent":20.97}, {"2016-06":0,"2016-07":0,"2016-08":0,"2016-09":0,"2016-10":0,"2016-11":0,"2016-12":0,"2017-01":1,"2017-
02":20,"id":"tut.vo.ibergrid.eu","Total":21,"Percent":0.01}, {"2016-06":0,"2016-07":0,"2016-08":0,"2016-09":16,"2016-10":0,"2016-11":0,"2016-12":4,"2017-01":0,"2017-
02":0,"id":"vo.access.egi.eu","Total":20,"Percent":0.01}, {"2016-06":44318,"2016-07":22433,"2016-08":41541,"2016-09":12450,"2016-10":9839,"2016-11":9213,"2016-12":15536,"2017-01":11974,"2017-
02":4532,"id":"Total","Total":171836,"Percent":""}, {"2016-06":"25.79%","2016-07":"13.05%","2016-08":"24.17%","2016-09":"7.25%","2016-10":"5.73%","2016-11":"5.36%","2016-12":"9.04%","2017-01":"6.97%","2017-
02":"2.64%","id":"Percent","Percent":"","Total":""}, {"id":"xlegend","0":"auger","1":"biomed","2":"compchem","3":"ops","4":"tut.vo.ibergrid.eu","5":"vo.access.egi.eu"}, {"id":"ylegend","0":"2016-06","1":"2016-
07","2":"2016-08","3":"2016-09","4":"2016-10","5":"2016-11","6":"2016-12","7":"2017-01","8":"2017-02","9":"id"}, 
{"id":"var","xrange":"DATE","yrange":"VO","query":"njobs","user_dn":"\/DC=org\/DC=terena\/DC=tcs\/C=ES\/O=CESGA\/CN=Ivan Diaz Alvarez idiaz@cesga.es","granted_vos":["atlas","biomed","cesga","dteam","env.see-grid-
sci.eu","fedcloud.egi.eu","ific","israelvo.isragrid.org.il","isravo.isragrid.org.il","kzvo.isragrid.org.il","lhcb","pheno","prod.vo.eu-eela.eu"],"granted_sites":["AEGIS04-KG","BG01-IPP","BG05-SUGrid","CESGA","EELA-
UTFSM","IFIC-LCG2","INFN-ROMA1-CMS","JINR-LCG2","JINR-T1","NGI_IL","RO-11-NIPNE"]}]

Back to Accounting Portal API