Documentation
¶
Index ¶
- Constants
- Variables
- func GetSelfPod(ctx context.Context, clnt *kclient) (*corev1.Pod, error)
- func GetSelfPodID() types.NamespacedName
- func RunNfsgMetricsExporter(log logr.Logger) error
- func UpdateDefaultVersions(version, commitid string)
- type Client
- type ClientIOStats
- type ClientIOs
- type ClientsDbusReader
- type DbusReader
- type Export
- type ExportsDbusReader
- func (exdr *ExportsDbusReader) GetAuthStats(exportID uint16) error
- func (exdr *ExportsDbusReader) GetExports() (unix.Timespec, []Export, error)
- func (exdr *ExportsDbusReader) GetFullV3Stats(exportID uint16) error
- func (exdr *ExportsDbusReader) GetFullV4Stats(exportID uint16) error
- func (exdr *ExportsDbusReader) GetGlobalOPS(exportID uint16) (*OperationsStats, bool, error)
- func (exdr *ExportsDbusReader) GetTotalOPS(exportID uint16) (*OperationsStats, bool, error)
- type IOCounts
- type IOStats
- type OperationCount
- type OperationStats
- type OperationsStats
- type ReplyHeader
- type Versions
Constants ¶
View Source
const ( PodNameEnvKey = "NFS_GANESHA_POD_NAME" PodNamespaceEnvKey = "NFS_GANESHA_POD_NAMESPACE" )
Variables ¶
View Source
var ( // DefaultMetricsPort is the default port used to export prometheus metrics DefaultMetricsPort = int(8080) // DefaultMetricsPath is the default HTTP path to export prometheus metrics DefaultMetricsPath = "/metrics" )
Functions ¶
func GetSelfPodID ¶
func GetSelfPodID() types.NamespacedName
func RunNfsgMetricsExporter ¶
RunNfsgMetricsExporter executes an HTTP server and exports NFS-Ganesha stats as Prometheus metrics.
func UpdateDefaultVersions ¶
func UpdateDefaultVersions(version, commitid string)
UpdateDefaultVersions re-assigns defaults upon init
Types ¶
type Client ¶
type Client struct { Client string NFSv3 bool MNTv3 bool NLMv4 bool RQUOTA bool NFSv40 bool NFSv41 bool NFSv42 bool Plan9 bool LastTime unix.Timespec }
Client Structure of the output of ShowClients dbus call
type ClientIOStats ¶
ClientIOStats
type ClientsDbusReader ¶
type ClientsDbusReader struct {
DbusReader
}
ClientsDbusReader
func (*ClientsDbusReader) GetClientIOs ¶
func (cldr *ClientsDbusReader) GetClientIOs( ipaddr string) (*ClientIOs, bool, error)
func (*ClientsDbusReader) GetClients ¶
func (cldr *ClientsDbusReader) GetClients() (unix.Timespec, []Client, error)
type DbusReader ¶
type DbusReader struct {
// contains filtered or unexported fields
}
DbusReader
func (*DbusReader) Close ¶
func (dr *DbusReader) Close()
func (*DbusReader) Setup ¶
func (dr *DbusReader) Setup() error
type Export ¶
type Export struct { ExportID uint32 Path string NFSv3 bool MNTv3 bool NLMv4 bool RQUOTA bool NFSv40 bool NFSv41 bool NFSv42 bool Plan9 bool LastTime unix.Timespec }
Export Structure of the output of ShowExports dbus call
type ExportsDbusReader ¶
type ExportsDbusReader struct {
DbusReader
}
ExportsDbusReader
func (*ExportsDbusReader) GetAuthStats ¶
func (exdr *ExportsDbusReader) GetAuthStats(exportID uint16) error
func (*ExportsDbusReader) GetExports ¶
func (exdr *ExportsDbusReader) GetExports() ( unix.Timespec, []Export, error)
func (*ExportsDbusReader) GetFullV3Stats ¶
func (exdr *ExportsDbusReader) GetFullV3Stats(exportID uint16) error
func (*ExportsDbusReader) GetFullV4Stats ¶
func (exdr *ExportsDbusReader) GetFullV4Stats(exportID uint16) error
func (*ExportsDbusReader) GetGlobalOPS ¶
func (exdr *ExportsDbusReader) GetGlobalOPS( exportID uint16) (*OperationsStats, bool, error)
func (*ExportsDbusReader) GetTotalOPS ¶
func (exdr *ExportsDbusReader) GetTotalOPS( exportID uint16) (*OperationsStats, bool, error)
type OperationCount ¶
type OperationCount struct { NFSv3 uint64 MNTv1 uint64 MNTv3 uint64 NLMv4 uint64 RQUOTA uint64 NFSv40 uint64 NFSv41 uint64 NFSv42 uint64 Plan9 uint64 }
OperationCount
type OperationsStats ¶
type OperationsStats struct { ReplyHeader OPS OperationCount }
OperationsStats
type ReplyHeader ¶
ReplyHeader
Click to show internal directories.
Click to hide internal directories.