get_chart_list[source]
get_chart_list(host:str='127.0.0.1:19999',starts_with:str=None,ends_with:str=None,protocol:str='http',verify:Union[str,bool]=True)
Get list of all available charts on a host.
Parameters:
- host
strThe host we want to get a list of available charts from. - starts_with
strA string to filter the list of charts returns to just those that start withstarts_with. - ends_with
strA string to filter the list of charts returns to just those that end withends_with. - protocol
str'http' or 'https'. - verify
Union[str, bool]verifyparameter to be set torequestsfor SSL cert verification.
Returns:
- chart_list
listA list of availalbe charts.
get_chart[source]
get_chart(api_call:str,data:list,col_sep:str='|',numeric_only:bool=True,float_size:str='float64',host_prefix:bool=False,host_sep:str=':')
Get data for an individual chart.
Parameters:
- api_call
tupleA tuple of (url,chart) for the url to pull data from and chart it represents. - data
listA list for dataframes for each chart to be appended to. - col_sep
strA character for separating chart and dimension in column names of dataframe. - numeric_only
boolSet to true if you want to filter out any non numeric data. - float_size
strfloat size to use if would like to save some memory, eg can use 'float32' or 'float16'. - host_prefix
boolTrue to prefix each colname with the corresponding host. - host_sep
strA character for separating host and chart and dimensions in column names of dataframe.
get_charts[source]
get_charts(api_calls:list,col_sep:str='|',timeout:int=60,numeric_only:bool=True,float_size:str='float64',host_prefix:bool=False,host_sep:str=':')
Create a nursey to make seperate async calls to get each chart.
Parameters:
- api_calls
listA list of tuple's of [(url,chart),...] of api calls that need to be made. - col_sep
strA character for separating chart and dimension in column names of dataframe. - timeout
intThe number of seconds for trio to move_on_after. - numeric_only
boolSet to true if you want to filter out any non numeric data. - float_size
strfloat size to use if would like to save some memory, eg can use 'float32' or 'float16'. - host_prefix
boolTrue to prefix each colname with the corresponding host. - host_sep
strA character for separating host and chart and dimensions in column names of dataframe.
Returns:
- df
pd.DataFrameA pandas dataframe with all chart data outer joined based on time index.
get_data[source]
get_data(hosts:list=['london.my-netdata.io'],charts:list=['system.cpu'],after:int=-60,before:int=0,points:int=0,col_sep:str='|',numeric_only:bool=True,ffill:bool=True,diff:bool=False,timeout:int=60,nunique_thold=None,std_thold:float=None,index_as_datetime:bool=False,freq:str='infer',group:str='average',sort_cols:bool=True,user:str=None,pwd:str=None,protocol:str='http',sort_rows:bool=True,float_size:str='float64',host_charts_dict:dict=None,host_prefix:bool=False,host_sep:str=':',charts_regex:str=None,verify:Union[str,bool]=True,dimensions:str=`''*, **options**:str=*''`*)
Define api calls to make and any post processing to be done.
Parameters:
- hosts
listA list of hosts to pull data from. - charts
listA list of charts to pull data for. - after
intThe timestamp or relative integer from which to pull data after. - before
intThe timestamp or relative integer from which to pull data before. - points
intThepointsparameter to pass to the api call if need to aggregate data in some way. - col_sep
strA character for separating chart and dimension in column names of dataframe. - numeric_only
boolSet to true if you want to filter out any non numeric data. - ffill
boolSet to true if you want to forward fill any null or missing values. - diff
boolSet to true if you want to get the difference of metrics as opposed to their raw value. - timeout
intThe number of seconds for trio to move_on_after. - nunique_thold [
float,int] If defined calls function to filter cols with low number of unique values. - std_thold
floatIf defined calls function to filter cols with low standard deviation. - index_as_datetime
boolIf true, set the index to be a pandas datetime. - freq
strFreq to be passed to pandas datetime index. - group
strThe grouping function to use in the netdata api call. - sort_cols
boolTrue to sort columns by name. - user
strA username to use if netdata is password protected. - pwd
strA password to use if netdata is password protected. - protocol
str'http' or 'https'. - sort_rows
boolTrue to sort rows by index. - float_size
strfloat size to use if would like to save some memory, eg can use 'float32' or 'float16'. - host_charts_dict
dictdictionary of hosts to pull for where each value is list of relevant charts to pull from that host. - host_prefix
boolTrue to prefix each colname with the corresponding host. - host_sep
strA character for separating host and chart and dimensions in column names of dataframe. - charts_regex
strA regex expression for charts you want data for. - verify
Union[str, bool]verifyparameter to be set torequestsfor SSL cert verification. - dimensions
strThedimensionsparameter to pass to the api call, defaults to '*' for all dimensions. - options
strTheoptionsparameter to pass to the api call, defaults to '' to just accept defaults.
Returns:
- df
pd.DataFrameA pandas dataframe with all chart data outer joined based on time index and any post processing done.
get_alarm_log[source]
get_alarm_log(host:str='127.0.0.1:19999',datetimes:bool=True,user:str=None,pwd:str=None,protocol:str='http',include_children:bool=False)
Get alarm log from host.
Parameters:
- host
strThe host we want to get the alarm log from. - user
strA username to use if netdata is password protected. - pwd
strA password to use if netdata is password protected. - protocol
str'http' or 'https'. - include_children
bool'True' to include alarm log for all children streamed to host.
Returns:
- df
pd.DataFrameA df of the alarm_log.
get_allmetrics[source]
get_allmetrics(host='london.my-netdata.io',charts:list=None,wide:bool=False,col_sep:str='|',sort_cols:bool=True,user:str=None,pwd:str=None,protocol:str='http',numeric_only:bool=True,float_size:str='float64',host_charts_dict:dict=None,host_prefix:bool=False,host_sep:str=':')
Get allmetrics into a df.
Parameters:
- host
strThe host we want to get the alarm log from. - charts
listA list of charts to pull data for. - wide
boolTrue if you want to return the data in wide format as opposed to long. - user
strA username to use if netdata is password protected. - pwd
strA password to use if netdata is password protected. - protocol
str'http' or 'https'. - numeric_only
boolSet to true if you want to filter out any non numeric data. - float_size
strfloat size to use if would like to save some memory, eg can use 'float32' or 'float16'.
Returns:
- df
pd.DataFrameA df of the latest data from allmetrics.
get_allmetrics_async[source]
get_allmetrics_async(host_charts_dict:dict=None,col_sep:str='|',numeric_only:bool=True,timeout:int=60,index_as_datetime:bool=False,freq:str='infer',sort_cols:bool=True,user:str=None,pwd:str=None,protocol:str='http',float_size:str='float64',host_prefix:bool=False,host_sep:str=':',wide:bool=False)
Define api calls to make and any post processing to be done.
Parameters:
- col_sep
strA character for separating chart and dimension in column names of dataframe. - numeric_only
boolSet to true if you want to filter out any non numeric data. - timeout
intThe number of seconds for trio to move_on_after. - index_as_datetime
boolIf true, set the index to be a pandas datetime. - freq
strFreq to be passed to pandas datetime index. - sort_cols
boolTrue to sort columns by name. - user
strA username to use if netdata is password protected. - pwd
strA password to use if netdata is password protected. - protocol
str'http' or 'https'. - float_size
strfloat size to use if would like to save some memory, eg can use 'float32' or 'float16'. - host_charts_dict
dictdictionary of hosts to pull for where each value is list of relevant charts to pull from that host. - host_prefix
boolTrue to prefix each colname with the corresponding host. - host_sep
strA character for separating host and chart and dimensions in column names of dataframe.
Returns:
- df
pd.DataFrameA pandas dataframe with all chart data outer joined based on time index and any post processing done.