diff options
Diffstat (limited to '')
14 files changed, 3972 insertions, 0 deletions
diff --git a/src/go/collectors/go.d.plugin/modules/freeradius/README.md b/src/go/collectors/go.d.plugin/modules/freeradius/README.md new file mode 120000 index 000000000..66deefdb7 --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/freeradius/README.md @@ -0,0 +1 @@ +integrations/freeradius.md
\ No newline at end of file diff --git a/src/go/collectors/go.d.plugin/modules/freeradius/api/client.go b/src/go/collectors/go.d.plugin/modules/freeradius/api/client.go new file mode 100644 index 000000000..01f784c17 --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/freeradius/api/client.go @@ -0,0 +1,174 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +package api + +import ( + "context" + "crypto/hmac" + "crypto/md5" + "fmt" + "net" + "strconv" + "time" + + "layeh.com/radius" + "layeh.com/radius/rfc2869" +) + +type Status struct { + AccessRequests int64 `stm:"access-requests"` + AccessAccepts int64 `stm:"access-accepts"` + AccessRejects int64 `stm:"access-rejects"` + AccessChallenges int64 `stm:"access-challenges"` + AuthResponses int64 `stm:"auth-responses"` + AuthDuplicateRequests int64 `stm:"auth-duplicate-requests"` + AuthMalformedRequests int64 `stm:"auth-malformed-requests"` + AuthInvalidRequests int64 `stm:"auth-invalid-requests"` + AuthDroppedRequests int64 `stm:"auth-dropped-requests"` + AuthUnknownTypes int64 `stm:"auth-unknown-types"` + + AccountingRequests int64 `stm:"accounting-requests"` + AccountingResponses int64 `stm:"accounting-responses"` + AcctDuplicateRequests int64 `stm:"acct-duplicate-requests"` + AcctMalformedRequests int64 `stm:"acct-malformed-requests"` + AcctInvalidRequests int64 `stm:"acct-invalid-requests"` + AcctDroppedRequests int64 `stm:"acct-dropped-requests"` + AcctUnknownTypes int64 `stm:"acct-unknown-types"` + + ProxyAccessRequests int64 `stm:"proxy-access-requests"` + ProxyAccessAccepts int64 `stm:"proxy-access-accepts"` + ProxyAccessRejects int64 `stm:"proxy-access-rejects"` + ProxyAccessChallenges int64 `stm:"proxy-access-challenges"` + ProxyAuthResponses int64 `stm:"proxy-auth-responses"` + ProxyAuthDuplicateRequests int64 `stm:"proxy-auth-duplicate-requests"` + ProxyAuthMalformedRequests int64 `stm:"proxy-auth-malformed-requests"` + ProxyAuthInvalidRequests int64 `stm:"proxy-auth-invalid-requests"` + ProxyAuthDroppedRequests int64 `stm:"proxy-auth-dropped-requests"` + ProxyAuthUnknownTypes int64 `stm:"proxy-auth-unknown-types"` + + ProxyAccountingRequests int64 `stm:"proxy-accounting-requests"` + ProxyAccountingResponses int64 `stm:"proxy-accounting-responses"` + ProxyAcctDuplicateRequests int64 `stm:"proxy-acct-duplicate-requests"` + ProxyAcctMalformedRequests int64 `stm:"proxy-acct-malformed-requests"` + ProxyAcctInvalidRequests int64 `stm:"proxy-acct-invalid-requests"` + ProxyAcctDroppedRequests int64 `stm:"proxy-acct-dropped-requests"` + ProxyAcctUnknownTypes int64 `stm:"proxy-acct-unknown-types"` +} + +type ( + radiusClient interface { + Exchange(ctx context.Context, packet *radius.Packet, address string) (*radius.Packet, error) + } + Config struct { + Address string + Port int + Secret string + Timeout time.Duration + } + Client struct { + address string + secret string + timeout time.Duration + radiusClient + } +) + +func New(conf Config) *Client { + return &Client{ + address: net.JoinHostPort(conf.Address, strconv.Itoa(conf.Port)), + secret: conf.Secret, + timeout: conf.Timeout, + radiusClient: &radius.Client{Retry: time.Second, MaxPacketErrors: 10}, + } +} + +func (c Client) Status() (*Status, error) { + packet, err := newStatusServerPacket(c.secret) + if err != nil { + return nil, fmt.Errorf("error on creating StatusServer packet: %v", err) + } + + resp, err := c.queryServer(packet) + if err != nil { + return nil, fmt.Errorf("error on request to '%s': %v", c.address, err) + } + + return decodeResponse(resp), nil +} + +func (c Client) queryServer(packet *radius.Packet) (*radius.Packet, error) { + ctx, cancel := context.WithTimeout(context.Background(), c.timeout) + defer cancel() + + resp, err := c.Exchange(ctx, packet, c.address) + if err != nil { + return nil, err + } + + if resp.Code != radius.CodeAccessAccept { + return nil, fmt.Errorf("'%s' returned response code %d", c.address, resp.Code) + } + return resp, nil +} + +func newStatusServerPacket(secret string) (*radius.Packet, error) { + // https://wiki.freeradius.org/config/Status#status-of-freeradius-server + packet := radius.New(radius.CodeStatusServer, []byte(secret)) + if err := FreeRADIUSStatisticsType_Set(packet, FreeRADIUSStatisticsType_Value_All); err != nil { + return nil, err + } + if err := rfc2869.MessageAuthenticator_Set(packet, make([]byte, 16)); err != nil { + return nil, err + } + hash := hmac.New(md5.New, packet.Secret) + encode, err := packet.Encode() + if err != nil { + return nil, err + } + if _, err := hash.Write(encode); err != nil { + return nil, err + } + if err := rfc2869.MessageAuthenticator_Set(packet, hash.Sum(nil)); err != nil { + return nil, err + } + return packet, nil +} + +func decodeResponse(resp *radius.Packet) *Status { + return &Status{ + AccessRequests: int64(FreeRADIUSTotalAccessRequests_Get(resp)), + AccessAccepts: int64(FreeRADIUSTotalAccessAccepts_Get(resp)), + AccessRejects: int64(FreeRADIUSTotalAccessRejects_Get(resp)), + AccessChallenges: int64(FreeRADIUSTotalAccessChallenges_Get(resp)), + AuthResponses: int64(FreeRADIUSTotalAuthResponses_Get(resp)), + AuthDuplicateRequests: int64(FreeRADIUSTotalAuthDuplicateRequests_Get(resp)), + AuthMalformedRequests: int64(FreeRADIUSTotalAuthMalformedRequests_Get(resp)), + AuthInvalidRequests: int64(FreeRADIUSTotalAuthInvalidRequests_Get(resp)), + AuthDroppedRequests: int64(FreeRADIUSTotalAuthDroppedRequests_Get(resp)), + AuthUnknownTypes: int64(FreeRADIUSTotalAuthUnknownTypes_Get(resp)), + AccountingRequests: int64(FreeRADIUSTotalAccountingRequests_Get(resp)), + AccountingResponses: int64(FreeRADIUSTotalAccountingResponses_Get(resp)), + AcctDuplicateRequests: int64(FreeRADIUSTotalAcctDuplicateRequests_Get(resp)), + AcctMalformedRequests: int64(FreeRADIUSTotalAcctMalformedRequests_Get(resp)), + AcctInvalidRequests: int64(FreeRADIUSTotalAcctInvalidRequests_Get(resp)), + AcctDroppedRequests: int64(FreeRADIUSTotalAcctDroppedRequests_Get(resp)), + AcctUnknownTypes: int64(FreeRADIUSTotalAcctUnknownTypes_Get(resp)), + ProxyAccessRequests: int64(FreeRADIUSTotalProxyAccessRequests_Get(resp)), + ProxyAccessAccepts: int64(FreeRADIUSTotalProxyAccessAccepts_Get(resp)), + ProxyAccessRejects: int64(FreeRADIUSTotalProxyAccessRejects_Get(resp)), + ProxyAccessChallenges: int64(FreeRADIUSTotalProxyAccessChallenges_Get(resp)), + ProxyAuthResponses: int64(FreeRADIUSTotalProxyAuthResponses_Get(resp)), + ProxyAuthDuplicateRequests: int64(FreeRADIUSTotalProxyAuthDuplicateRequests_Get(resp)), + ProxyAuthMalformedRequests: int64(FreeRADIUSTotalProxyAuthMalformedRequests_Get(resp)), + ProxyAuthInvalidRequests: int64(FreeRADIUSTotalProxyAuthInvalidRequests_Get(resp)), + ProxyAuthDroppedRequests: int64(FreeRADIUSTotalProxyAuthDroppedRequests_Get(resp)), + ProxyAuthUnknownTypes: int64(FreeRADIUSTotalProxyAuthUnknownTypes_Get(resp)), + ProxyAccountingRequests: int64(FreeRADIUSTotalProxyAccountingRequests_Get(resp)), + ProxyAccountingResponses: int64(FreeRADIUSTotalProxyAccountingResponses_Get(resp)), + ProxyAcctDuplicateRequests: int64(FreeRADIUSTotalProxyAcctDuplicateRequests_Get(resp)), + ProxyAcctMalformedRequests: int64(FreeRADIUSTotalProxyAcctMalformedRequests_Get(resp)), + ProxyAcctInvalidRequests: int64(FreeRADIUSTotalProxyAcctInvalidRequests_Get(resp)), + ProxyAcctDroppedRequests: int64(FreeRADIUSTotalProxyAcctDroppedRequests_Get(resp)), + ProxyAcctUnknownTypes: int64(FreeRADIUSTotalProxyAcctUnknownTypes_Get(resp)), + } +} diff --git a/src/go/collectors/go.d.plugin/modules/freeradius/api/client_test.go b/src/go/collectors/go.d.plugin/modules/freeradius/api/client_test.go new file mode 100644 index 000000000..9323aa992 --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/freeradius/api/client_test.go @@ -0,0 +1,152 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +package api + +import ( + "context" + "errors" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "layeh.com/radius" +) + +func TestNew(t *testing.T) { + assert.NotNil(t, New(Config{})) +} + +func TestClient_Status(t *testing.T) { + var c Client + c.radiusClient = newOKMockFreeRADIUSClient() + + expected := Status{ + AccessRequests: 1, + AccessAccepts: 2, + AccessRejects: 3, + AccessChallenges: 4, + AuthResponses: 5, + AuthDuplicateRequests: 6, + AuthMalformedRequests: 7, + AuthInvalidRequests: 8, + AuthDroppedRequests: 9, + AuthUnknownTypes: 10, + AccountingRequests: 11, + AccountingResponses: 12, + AcctDuplicateRequests: 13, + AcctMalformedRequests: 14, + AcctInvalidRequests: 15, + AcctDroppedRequests: 16, + AcctUnknownTypes: 17, + ProxyAccessRequests: 18, + ProxyAccessAccepts: 19, + ProxyAccessRejects: 20, + ProxyAccessChallenges: 21, + ProxyAuthResponses: 22, + ProxyAuthDuplicateRequests: 23, + ProxyAuthMalformedRequests: 24, + ProxyAuthInvalidRequests: 25, + ProxyAuthDroppedRequests: 26, + ProxyAuthUnknownTypes: 27, + ProxyAccountingRequests: 28, + ProxyAccountingResponses: 29, + ProxyAcctDuplicateRequests: 30, + ProxyAcctMalformedRequests: 31, + ProxyAcctInvalidRequests: 32, + ProxyAcctDroppedRequests: 33, + ProxyAcctUnknownTypes: 34, + } + + s, err := c.Status() + + require.NoError(t, err) + assert.Equal(t, expected, *s) +} + +func TestClient_Status_ReturnsErrorIfClientExchangeReturnsError(t *testing.T) { + var c Client + c.radiusClient = newErrorMockFreeRADIUSClient() + + s, err := c.Status() + + assert.Nil(t, s) + assert.Error(t, err) +} + +func TestClient_Status_ReturnsErrorIfServerResponseHasBadStatus(t *testing.T) { + var c Client + c.radiusClient = newBadRespCodeMockFreeRADIUSClient() + + s, err := c.Status() + + assert.Nil(t, s) + assert.Error(t, err) +} + +type mockFreeRADIUSClient struct { + errOnExchange bool + badRespCode bool +} + +func newOKMockFreeRADIUSClient() *mockFreeRADIUSClient { + return &mockFreeRADIUSClient{} +} + +func newErrorMockFreeRADIUSClient() *mockFreeRADIUSClient { + return &mockFreeRADIUSClient{errOnExchange: true} +} + +func newBadRespCodeMockFreeRADIUSClient() *mockFreeRADIUSClient { + return &mockFreeRADIUSClient{badRespCode: true} +} + +func (m mockFreeRADIUSClient) Exchange(_ context.Context, _ *radius.Packet, _ string) (*radius.Packet, error) { + if m.errOnExchange { + return nil, errors.New("mock Exchange error") + } + resp := radius.New(radius.CodeAccessAccept, []byte("secret")) + if m.badRespCode { + resp.Code = radius.CodeAccessReject + } else { + resp.Code = radius.CodeAccessAccept + } + addValues(resp) + return resp, nil +} + +func addValues(resp *radius.Packet) { + _ = FreeRADIUSTotalAccessRequests_Add(resp, 1) + _ = FreeRADIUSTotalAccessAccepts_Add(resp, 2) + _ = FreeRADIUSTotalAccessRejects_Add(resp, 3) + _ = FreeRADIUSTotalAccessChallenges_Add(resp, 4) + _ = FreeRADIUSTotalAuthResponses_Add(resp, 5) + _ = FreeRADIUSTotalAuthDuplicateRequests_Add(resp, 6) + _ = FreeRADIUSTotalAuthMalformedRequests_Add(resp, 7) + _ = FreeRADIUSTotalAuthInvalidRequests_Add(resp, 8) + _ = FreeRADIUSTotalAuthDroppedRequests_Add(resp, 9) + _ = FreeRADIUSTotalAuthUnknownTypes_Add(resp, 10) + _ = FreeRADIUSTotalAccountingRequests_Add(resp, 11) + _ = FreeRADIUSTotalAccountingResponses_Add(resp, 12) + _ = FreeRADIUSTotalAcctDuplicateRequests_Add(resp, 13) + _ = FreeRADIUSTotalAcctMalformedRequests_Add(resp, 14) + _ = FreeRADIUSTotalAcctInvalidRequests_Add(resp, 15) + _ = FreeRADIUSTotalAcctDroppedRequests_Add(resp, 16) + _ = FreeRADIUSTotalAcctUnknownTypes_Add(resp, 17) + _ = FreeRADIUSTotalProxyAccessRequests_Add(resp, 18) + _ = FreeRADIUSTotalProxyAccessAccepts_Add(resp, 19) + _ = FreeRADIUSTotalProxyAccessRejects_Add(resp, 20) + _ = FreeRADIUSTotalProxyAccessChallenges_Add(resp, 21) + _ = FreeRADIUSTotalProxyAuthResponses_Add(resp, 22) + _ = FreeRADIUSTotalProxyAuthDuplicateRequests_Add(resp, 23) + _ = FreeRADIUSTotalProxyAuthMalformedRequests_Add(resp, 24) + _ = FreeRADIUSTotalProxyAuthInvalidRequests_Add(resp, 25) + _ = FreeRADIUSTotalProxyAuthDroppedRequests_Add(resp, 26) + _ = FreeRADIUSTotalProxyAuthUnknownTypes_Add(resp, 27) + _ = FreeRADIUSTotalProxyAccountingRequests_Add(resp, 28) + _ = FreeRADIUSTotalProxyAccountingResponses_Add(resp, 29) + _ = FreeRADIUSTotalProxyAcctDuplicateRequests_Add(resp, 30) + _ = FreeRADIUSTotalProxyAcctMalformedRequests_Add(resp, 31) + _ = FreeRADIUSTotalProxyAcctInvalidRequests_Add(resp, 32) + _ = FreeRADIUSTotalProxyAcctDroppedRequests_Add(resp, 33) + _ = FreeRADIUSTotalProxyAcctUnknownTypes_Add(resp, 34) +} diff --git a/src/go/collectors/go.d.plugin/modules/freeradius/api/dictionary.go b/src/go/collectors/go.d.plugin/modules/freeradius/api/dictionary.go new file mode 100644 index 000000000..0ed348ae3 --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/freeradius/api/dictionary.go @@ -0,0 +1,2683 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +package api + +import ( + "strconv" + "time" + + "layeh.com/radius" + "layeh.com/radius/rfc2865" +) + +/* +The response from the freeradius 3.0.12+dfsg-5+deb9u1 + +Sent Status-Server Id 23 from 0.0.0.0:37131 to 127.0.0.1:18121 length 50 + Message-Authenticator = 0x00 + FreeRADIUS-Statistics-Type = All +Received Access-Accept Id 23 from 127.0.0.1:18121 to 0.0.0.0:0 length 536 + FreeRADIUS-Total-Access-Requests = 3 + FreeRADIUS-Total-Access-Accepts = 0 + FreeRADIUS-Total-Access-Rejects = 0 + FreeRADIUS-Total-Access-Challenges = 0 + FreeRADIUS-Total-Auth-Responses = 0 + FreeRADIUS-Total-Auth-Duplicate-Requests = 0 + FreeRADIUS-Total-Auth-Malformed-Requests = 0 + FreeRADIUS-Total-Auth-Invalid-Requests = 0 + FreeRADIUS-Total-Auth-Dropped-Requests = 0 + FreeRADIUS-Total-Auth-Unknown-Types = 0 + FreeRADIUS-Total-Accounting-Requests = 0 + FreeRADIUS-Total-Accounting-Responses = 0 + FreeRADIUS-Total-Acct-Duplicate-Requests = 0 + FreeRADIUS-Total-Acct-Malformed-Requests = 0 + FreeRADIUS-Total-Acct-Invalid-Requests = 0 + FreeRADIUS-Total-Acct-Dropped-Requests = 0 + FreeRADIUS-Total-Acct-Unknown-Types = 0 + FreeRADIUS-Total-Proxy-Access-Requests = 0 + FreeRADIUS-Total-Proxy-Access-Accepts = 0 + FreeRADIUS-Total-Proxy-Access-Rejects = 0 + FreeRADIUS-Total-Proxy-Access-Challenges = 0 + FreeRADIUS-Total-Proxy-Auth-Responses = 0 + FreeRADIUS-Total-Proxy-Auth-Duplicate-Requests = 0 + FreeRADIUS-Total-Proxy-Auth-Malformed-Requests = 0 + FreeRADIUS-Total-Proxy-Auth-Invalid-Requests = 0 + FreeRADIUS-Total-Proxy-Auth-Dropped-Requests = 0 + FreeRADIUS-Total-Proxy-Auth-Unknown-Types = 0 + FreeRADIUS-Total-Proxy-Accounting-Requests = 0 + FreeRADIUS-Total-Proxy-Accounting-Responses = 0 + FreeRADIUS-Total-Proxy-Acct-Duplicate-Requests = 0 + FreeRADIUS-Total-Proxy-Acct-Malformed-Requests = 0 + FreeRADIUS-Total-Proxy-Acct-Invalid-Requests = 0 + FreeRADIUS-Total-Proxy-Acct-Dropped-Requests = 0 + FreeRADIUS-Total-Proxy-Acct-Unknown-Types = 0 + FreeRADIUS-Stats-Start-Time = "Dec 27 2018 05:08:02 +09" + FreeRADIUS-Stats-HUP-Time = "Dec 27 2018 05:08:02 +09" + FreeRADIUS-Queue-Len-Internal = 0 + FreeRADIUS-Queue-Len-Proxy = 0 + FreeRADIUS-Queue-Len-Auth = 0 + FreeRADIUS-Queue-Len-Acct = 0 + FreeRADIUS-Queue-Len-Detail = 0 + FreeRADIUS-Queue-PPS-In = 0 + FreeRADIUS-Queue-PPS-Out = 0 +*/ + +// Code generation tool https://github.com/layeh/radius/tree/master/cmd/radius-dict-gen. +// Used dictionary: dictionary.freeradius from /usr/share/freeradius/ directory (freeradius 3.0.12+dfsg-5+deb9u1) +// All attributes that are not in response were removed to reduce the amount of generated code. + +// Code generated by radius-dict-gen. DO NOT EDIT. + +const ( + _FreeRADIUS_VendorID = 11344 +) + +func _FreeRADIUS_AddVendor(p *radius.Packet, typ byte, attr radius.Attribute) (err error) { + var vsa radius.Attribute + vendor := make(radius.Attribute, 2+len(attr)) + vendor[0] = typ + vendor[1] = byte(len(vendor)) + copy(vendor[2:], attr) + vsa, err = radius.NewVendorSpecific(_FreeRADIUS_VendorID, vendor) + if err != nil { + return + } + p.Add(rfc2865.VendorSpecific_Type, vsa) + return +} + +func _FreeRADIUS_GetsVendor(p *radius.Packet, typ byte) (values []radius.Attribute) { + for _, attr := range p.Attributes[rfc2865.VendorSpecific_Type] { + vendorID, vsa, err := radius.VendorSpecific(attr) + if err != nil || vendorID != _FreeRADIUS_VendorID { + continue + } + for len(vsa) >= 3 { + vsaTyp, vsaLen := vsa[0], vsa[1] + if int(vsaLen) > len(vsa) || vsaLen < 3 { + break + } + if vsaTyp == typ { + values = append(values, vsa[2:int(vsaLen)]) + } + vsa = vsa[int(vsaLen):] + } + } + return +} + +func _FreeRADIUS_LookupVendor(p *radius.Packet, typ byte) (attr radius.Attribute, ok bool) { + for _, a := range p.Attributes[rfc2865.VendorSpecific_Type] { + vendorID, vsa, err := radius.VendorSpecific(a) + if err != nil || vendorID != _FreeRADIUS_VendorID { + continue + } + for len(vsa) >= 3 { + vsaTyp, vsaLen := vsa[0], vsa[1] + if int(vsaLen) > len(vsa) || vsaLen < 3 { + break + } + if vsaTyp == typ { + return vsa[2:int(vsaLen)], true + } + vsa = vsa[int(vsaLen):] + } + } + return +} + +func _FreeRADIUS_SetVendor(p *radius.Packet, typ byte, attr radius.Attribute) (err error) { + for i := 0; i < len(p.Attributes[rfc2865.VendorSpecific_Type]); { + vendorID, vsa, err := radius.VendorSpecific(p.Attributes[rfc2865.VendorSpecific_Type][i]) + if err != nil || vendorID != _FreeRADIUS_VendorID { + i++ + continue + } + for j := 0; len(vsa[j:]) >= 3; { + vsaTyp, vsaLen := vsa[0], vsa[1] + if int(vsaLen) > len(vsa[j:]) || vsaLen < 3 { + i++ + break + } + if vsaTyp == typ { + vsa = append(vsa[:j], vsa[j+int(vsaLen):]...) + } + j += int(vsaLen) + } + if len(vsa) > 0 { + copy(p.Attributes[rfc2865.VendorSpecific_Type][i][4:], vsa) + i++ + } else { + p.Attributes[rfc2865.VendorSpecific_Type] = append(p.Attributes[rfc2865.VendorSpecific_Type][:i], p.Attributes[rfc2865.VendorSpecific_Type][i+i:]...) + } + } + return _FreeRADIUS_AddVendor(p, typ, attr) +} + +func _FreeRADIUS_DelVendor(p *radius.Packet, typ byte) { +vsaLoop: + for i := 0; i < len(p.Attributes[rfc2865.VendorSpecific_Type]); { + attr := p.Attributes[rfc2865.VendorSpecific_Type][i] + vendorID, vsa, err := radius.VendorSpecific(attr) + if err != nil || vendorID != _FreeRADIUS_VendorID { + continue + } + offset := 0 + for len(vsa[offset:]) >= 3 { + vsaTyp, vsaLen := vsa[offset], vsa[offset+1] + if int(vsaLen) > len(vsa) || vsaLen < 3 { + continue vsaLoop + } + if vsaTyp == typ { + copy(vsa[offset:], vsa[offset+int(vsaLen):]) + vsa = vsa[:len(vsa)-int(vsaLen)] + } else { + offset += int(vsaLen) + } + } + if offset == 0 { + p.Attributes[rfc2865.VendorSpecific_Type] = append(p.Attributes[rfc2865.VendorSpecific_Type][:i], p.Attributes[rfc2865.VendorSpecific_Type][i+1:]...) + } else { + i++ + } + } + return +} + +type FreeRADIUSStatisticsType uint32 + +const ( + FreeRADIUSStatisticsType_Value_All FreeRADIUSStatisticsType = 31 +) + +var FreeRADIUSStatisticsType_Strings = map[FreeRADIUSStatisticsType]string{ + FreeRADIUSStatisticsType_Value_All: "All", +} + +func (a FreeRADIUSStatisticsType) String() string { + if str, ok := FreeRADIUSStatisticsType_Strings[a]; ok { + return str + } + return "FreeRADIUSStatisticsType(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSStatisticsType_Add(p *radius.Packet, value FreeRADIUSStatisticsType) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 127, a) +} + +func FreeRADIUSStatisticsType_Get(p *radius.Packet) (value FreeRADIUSStatisticsType) { + value, _ = FreeRADIUSStatisticsType_Lookup(p) + return +} + +func FreeRADIUSStatisticsType_Gets(p *radius.Packet) (values []FreeRADIUSStatisticsType, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 127) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSStatisticsType(i)) + } + return +} + +func FreeRADIUSStatisticsType_Lookup(p *radius.Packet) (value FreeRADIUSStatisticsType, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 127) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSStatisticsType(i) + return +} + +func FreeRADIUSStatisticsType_Set(p *radius.Packet, value FreeRADIUSStatisticsType) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 127, a) +} + +func FreeRADIUSStatisticsType_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 127) +} + +type FreeRADIUSTotalAccessRequests uint32 + +var FreeRADIUSTotalAccessRequests_Strings = map[FreeRADIUSTotalAccessRequests]string{} + +func (a FreeRADIUSTotalAccessRequests) String() string { + if str, ok := FreeRADIUSTotalAccessRequests_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalAccessRequests(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalAccessRequests_Add(p *radius.Packet, value FreeRADIUSTotalAccessRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 128, a) +} + +func FreeRADIUSTotalAccessRequests_Get(p *radius.Packet) (value FreeRADIUSTotalAccessRequests) { + value, _ = FreeRADIUSTotalAccessRequests_Lookup(p) + return +} + +func FreeRADIUSTotalAccessRequests_Gets(p *radius.Packet) (values []FreeRADIUSTotalAccessRequests, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 128) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalAccessRequests(i)) + } + return +} + +func FreeRADIUSTotalAccessRequests_Lookup(p *radius.Packet) (value FreeRADIUSTotalAccessRequests, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 128) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalAccessRequests(i) + return +} + +func FreeRADIUSTotalAccessRequests_Set(p *radius.Packet, value FreeRADIUSTotalAccessRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 128, a) +} + +func FreeRADIUSTotalAccessRequests_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 128) +} + +type FreeRADIUSTotalAccessAccepts uint32 + +var FreeRADIUSTotalAccessAccepts_Strings = map[FreeRADIUSTotalAccessAccepts]string{} + +func (a FreeRADIUSTotalAccessAccepts) String() string { + if str, ok := FreeRADIUSTotalAccessAccepts_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalAccessAccepts(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalAccessAccepts_Add(p *radius.Packet, value FreeRADIUSTotalAccessAccepts) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 129, a) +} + +func FreeRADIUSTotalAccessAccepts_Get(p *radius.Packet) (value FreeRADIUSTotalAccessAccepts) { + value, _ = FreeRADIUSTotalAccessAccepts_Lookup(p) + return +} + +func FreeRADIUSTotalAccessAccepts_Gets(p *radius.Packet) (values []FreeRADIUSTotalAccessAccepts, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 129) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalAccessAccepts(i)) + } + return +} + +func FreeRADIUSTotalAccessAccepts_Lookup(p *radius.Packet) (value FreeRADIUSTotalAccessAccepts, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 129) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalAccessAccepts(i) + return +} + +func FreeRADIUSTotalAccessAccepts_Set(p *radius.Packet, value FreeRADIUSTotalAccessAccepts) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 129, a) +} + +func FreeRADIUSTotalAccessAccepts_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 129) +} + +type FreeRADIUSTotalAccessRejects uint32 + +var FreeRADIUSTotalAccessRejects_Strings = map[FreeRADIUSTotalAccessRejects]string{} + +func (a FreeRADIUSTotalAccessRejects) String() string { + if str, ok := FreeRADIUSTotalAccessRejects_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalAccessRejects(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalAccessRejects_Add(p *radius.Packet, value FreeRADIUSTotalAccessRejects) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 130, a) +} + +func FreeRADIUSTotalAccessRejects_Get(p *radius.Packet) (value FreeRADIUSTotalAccessRejects) { + value, _ = FreeRADIUSTotalAccessRejects_Lookup(p) + return +} + +func FreeRADIUSTotalAccessRejects_Gets(p *radius.Packet) (values []FreeRADIUSTotalAccessRejects, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 130) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalAccessRejects(i)) + } + return +} + +func FreeRADIUSTotalAccessRejects_Lookup(p *radius.Packet) (value FreeRADIUSTotalAccessRejects, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 130) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalAccessRejects(i) + return +} + +func FreeRADIUSTotalAccessRejects_Set(p *radius.Packet, value FreeRADIUSTotalAccessRejects) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 130, a) +} + +func FreeRADIUSTotalAccessRejects_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 130) +} + +type FreeRADIUSTotalAccessChallenges uint32 + +var FreeRADIUSTotalAccessChallenges_Strings = map[FreeRADIUSTotalAccessChallenges]string{} + +func (a FreeRADIUSTotalAccessChallenges) String() string { + if str, ok := FreeRADIUSTotalAccessChallenges_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalAccessChallenges(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalAccessChallenges_Add(p *radius.Packet, value FreeRADIUSTotalAccessChallenges) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 131, a) +} + +func FreeRADIUSTotalAccessChallenges_Get(p *radius.Packet) (value FreeRADIUSTotalAccessChallenges) { + value, _ = FreeRADIUSTotalAccessChallenges_Lookup(p) + return +} + +func FreeRADIUSTotalAccessChallenges_Gets(p *radius.Packet) (values []FreeRADIUSTotalAccessChallenges, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 131) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalAccessChallenges(i)) + } + return +} + +func FreeRADIUSTotalAccessChallenges_Lookup(p *radius.Packet) (value FreeRADIUSTotalAccessChallenges, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 131) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalAccessChallenges(i) + return +} + +func FreeRADIUSTotalAccessChallenges_Set(p *radius.Packet, value FreeRADIUSTotalAccessChallenges) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 131, a) +} + +func FreeRADIUSTotalAccessChallenges_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 131) +} + +type FreeRADIUSTotalAuthResponses uint32 + +var FreeRADIUSTotalAuthResponses_Strings = map[FreeRADIUSTotalAuthResponses]string{} + +func (a FreeRADIUSTotalAuthResponses) String() string { + if str, ok := FreeRADIUSTotalAuthResponses_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalAuthResponses(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalAuthResponses_Add(p *radius.Packet, value FreeRADIUSTotalAuthResponses) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 132, a) +} + +func FreeRADIUSTotalAuthResponses_Get(p *radius.Packet) (value FreeRADIUSTotalAuthResponses) { + value, _ = FreeRADIUSTotalAuthResponses_Lookup(p) + return +} + +func FreeRADIUSTotalAuthResponses_Gets(p *radius.Packet) (values []FreeRADIUSTotalAuthResponses, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 132) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalAuthResponses(i)) + } + return +} + +func FreeRADIUSTotalAuthResponses_Lookup(p *radius.Packet) (value FreeRADIUSTotalAuthResponses, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 132) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalAuthResponses(i) + return +} + +func FreeRADIUSTotalAuthResponses_Set(p *radius.Packet, value FreeRADIUSTotalAuthResponses) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 132, a) +} + +func FreeRADIUSTotalAuthResponses_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 132) +} + +type FreeRADIUSTotalAuthDuplicateRequests uint32 + +var FreeRADIUSTotalAuthDuplicateRequests_Strings = map[FreeRADIUSTotalAuthDuplicateRequests]string{} + +func (a FreeRADIUSTotalAuthDuplicateRequests) String() string { + if str, ok := FreeRADIUSTotalAuthDuplicateRequests_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalAuthDuplicateRequests(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalAuthDuplicateRequests_Add(p *radius.Packet, value FreeRADIUSTotalAuthDuplicateRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 133, a) +} + +func FreeRADIUSTotalAuthDuplicateRequests_Get(p *radius.Packet) (value FreeRADIUSTotalAuthDuplicateRequests) { + value, _ = FreeRADIUSTotalAuthDuplicateRequests_Lookup(p) + return +} + +func FreeRADIUSTotalAuthDuplicateRequests_Gets(p *radius.Packet) (values []FreeRADIUSTotalAuthDuplicateRequests, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 133) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalAuthDuplicateRequests(i)) + } + return +} + +func FreeRADIUSTotalAuthDuplicateRequests_Lookup(p *radius.Packet) (value FreeRADIUSTotalAuthDuplicateRequests, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 133) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalAuthDuplicateRequests(i) + return +} + +func FreeRADIUSTotalAuthDuplicateRequests_Set(p *radius.Packet, value FreeRADIUSTotalAuthDuplicateRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 133, a) +} + +func FreeRADIUSTotalAuthDuplicateRequests_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 133) +} + +type FreeRADIUSTotalAuthMalformedRequests uint32 + +var FreeRADIUSTotalAuthMalformedRequests_Strings = map[FreeRADIUSTotalAuthMalformedRequests]string{} + +func (a FreeRADIUSTotalAuthMalformedRequests) String() string { + if str, ok := FreeRADIUSTotalAuthMalformedRequests_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalAuthMalformedRequests(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalAuthMalformedRequests_Add(p *radius.Packet, value FreeRADIUSTotalAuthMalformedRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 134, a) +} + +func FreeRADIUSTotalAuthMalformedRequests_Get(p *radius.Packet) (value FreeRADIUSTotalAuthMalformedRequests) { + value, _ = FreeRADIUSTotalAuthMalformedRequests_Lookup(p) + return +} + +func FreeRADIUSTotalAuthMalformedRequests_Gets(p *radius.Packet) (values []FreeRADIUSTotalAuthMalformedRequests, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 134) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalAuthMalformedRequests(i)) + } + return +} + +func FreeRADIUSTotalAuthMalformedRequests_Lookup(p *radius.Packet) (value FreeRADIUSTotalAuthMalformedRequests, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 134) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalAuthMalformedRequests(i) + return +} + +func FreeRADIUSTotalAuthMalformedRequests_Set(p *radius.Packet, value FreeRADIUSTotalAuthMalformedRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 134, a) +} + +func FreeRADIUSTotalAuthMalformedRequests_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 134) +} + +type FreeRADIUSTotalAuthInvalidRequests uint32 + +var FreeRADIUSTotalAuthInvalidRequests_Strings = map[FreeRADIUSTotalAuthInvalidRequests]string{} + +func (a FreeRADIUSTotalAuthInvalidRequests) String() string { + if str, ok := FreeRADIUSTotalAuthInvalidRequests_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalAuthInvalidRequests(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalAuthInvalidRequests_Add(p *radius.Packet, value FreeRADIUSTotalAuthInvalidRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 135, a) +} + +func FreeRADIUSTotalAuthInvalidRequests_Get(p *radius.Packet) (value FreeRADIUSTotalAuthInvalidRequests) { + value, _ = FreeRADIUSTotalAuthInvalidRequests_Lookup(p) + return +} + +func FreeRADIUSTotalAuthInvalidRequests_Gets(p *radius.Packet) (values []FreeRADIUSTotalAuthInvalidRequests, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 135) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalAuthInvalidRequests(i)) + } + return +} + +func FreeRADIUSTotalAuthInvalidRequests_Lookup(p *radius.Packet) (value FreeRADIUSTotalAuthInvalidRequests, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 135) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalAuthInvalidRequests(i) + return +} + +func FreeRADIUSTotalAuthInvalidRequests_Set(p *radius.Packet, value FreeRADIUSTotalAuthInvalidRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 135, a) +} + +func FreeRADIUSTotalAuthInvalidRequests_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 135) +} + +type FreeRADIUSTotalAuthDroppedRequests uint32 + +var FreeRADIUSTotalAuthDroppedRequests_Strings = map[FreeRADIUSTotalAuthDroppedRequests]string{} + +func (a FreeRADIUSTotalAuthDroppedRequests) String() string { + if str, ok := FreeRADIUSTotalAuthDroppedRequests_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalAuthDroppedRequests(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalAuthDroppedRequests_Add(p *radius.Packet, value FreeRADIUSTotalAuthDroppedRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 136, a) +} + +func FreeRADIUSTotalAuthDroppedRequests_Get(p *radius.Packet) (value FreeRADIUSTotalAuthDroppedRequests) { + value, _ = FreeRADIUSTotalAuthDroppedRequests_Lookup(p) + return +} + +func FreeRADIUSTotalAuthDroppedRequests_Gets(p *radius.Packet) (values []FreeRADIUSTotalAuthDroppedRequests, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 136) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalAuthDroppedRequests(i)) + } + return +} + +func FreeRADIUSTotalAuthDroppedRequests_Lookup(p *radius.Packet) (value FreeRADIUSTotalAuthDroppedRequests, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 136) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalAuthDroppedRequests(i) + return +} + +func FreeRADIUSTotalAuthDroppedRequests_Set(p *radius.Packet, value FreeRADIUSTotalAuthDroppedRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 136, a) +} + +func FreeRADIUSTotalAuthDroppedRequests_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 136) +} + +type FreeRADIUSTotalAuthUnknownTypes uint32 + +var FreeRADIUSTotalAuthUnknownTypes_Strings = map[FreeRADIUSTotalAuthUnknownTypes]string{} + +func (a FreeRADIUSTotalAuthUnknownTypes) String() string { + if str, ok := FreeRADIUSTotalAuthUnknownTypes_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalAuthUnknownTypes(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalAuthUnknownTypes_Add(p *radius.Packet, value FreeRADIUSTotalAuthUnknownTypes) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 137, a) +} + +func FreeRADIUSTotalAuthUnknownTypes_Get(p *radius.Packet) (value FreeRADIUSTotalAuthUnknownTypes) { + value, _ = FreeRADIUSTotalAuthUnknownTypes_Lookup(p) + return +} + +func FreeRADIUSTotalAuthUnknownTypes_Gets(p *radius.Packet) (values []FreeRADIUSTotalAuthUnknownTypes, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 137) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalAuthUnknownTypes(i)) + } + return +} + +func FreeRADIUSTotalAuthUnknownTypes_Lookup(p *radius.Packet) (value FreeRADIUSTotalAuthUnknownTypes, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 137) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalAuthUnknownTypes(i) + return +} + +func FreeRADIUSTotalAuthUnknownTypes_Set(p *radius.Packet, value FreeRADIUSTotalAuthUnknownTypes) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 137, a) +} + +func FreeRADIUSTotalAuthUnknownTypes_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 137) +} + +type FreeRADIUSTotalProxyAccessRequests uint32 + +var FreeRADIUSTotalProxyAccessRequests_Strings = map[FreeRADIUSTotalProxyAccessRequests]string{} + +func (a FreeRADIUSTotalProxyAccessRequests) String() string { + if str, ok := FreeRADIUSTotalProxyAccessRequests_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalProxyAccessRequests(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalProxyAccessRequests_Add(p *radius.Packet, value FreeRADIUSTotalProxyAccessRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 138, a) +} + +func FreeRADIUSTotalProxyAccessRequests_Get(p *radius.Packet) (value FreeRADIUSTotalProxyAccessRequests) { + value, _ = FreeRADIUSTotalProxyAccessRequests_Lookup(p) + return +} + +func FreeRADIUSTotalProxyAccessRequests_Gets(p *radius.Packet) (values []FreeRADIUSTotalProxyAccessRequests, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 138) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalProxyAccessRequests(i)) + } + return +} + +func FreeRADIUSTotalProxyAccessRequests_Lookup(p *radius.Packet) (value FreeRADIUSTotalProxyAccessRequests, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 138) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalProxyAccessRequests(i) + return +} + +func FreeRADIUSTotalProxyAccessRequests_Set(p *radius.Packet, value FreeRADIUSTotalProxyAccessRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 138, a) +} + +func FreeRADIUSTotalProxyAccessRequests_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 138) +} + +type FreeRADIUSTotalProxyAccessAccepts uint32 + +var FreeRADIUSTotalProxyAccessAccepts_Strings = map[FreeRADIUSTotalProxyAccessAccepts]string{} + +func (a FreeRADIUSTotalProxyAccessAccepts) String() string { + if str, ok := FreeRADIUSTotalProxyAccessAccepts_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalProxyAccessAccepts(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalProxyAccessAccepts_Add(p *radius.Packet, value FreeRADIUSTotalProxyAccessAccepts) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 139, a) +} + +func FreeRADIUSTotalProxyAccessAccepts_Get(p *radius.Packet) (value FreeRADIUSTotalProxyAccessAccepts) { + value, _ = FreeRADIUSTotalProxyAccessAccepts_Lookup(p) + return +} + +func FreeRADIUSTotalProxyAccessAccepts_Gets(p *radius.Packet) (values []FreeRADIUSTotalProxyAccessAccepts, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 139) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalProxyAccessAccepts(i)) + } + return +} + +func FreeRADIUSTotalProxyAccessAccepts_Lookup(p *radius.Packet) (value FreeRADIUSTotalProxyAccessAccepts, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 139) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalProxyAccessAccepts(i) + return +} + +func FreeRADIUSTotalProxyAccessAccepts_Set(p *radius.Packet, value FreeRADIUSTotalProxyAccessAccepts) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 139, a) +} + +func FreeRADIUSTotalProxyAccessAccepts_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 139) +} + +type FreeRADIUSTotalProxyAccessRejects uint32 + +var FreeRADIUSTotalProxyAccessRejects_Strings = map[FreeRADIUSTotalProxyAccessRejects]string{} + +func (a FreeRADIUSTotalProxyAccessRejects) String() string { + if str, ok := FreeRADIUSTotalProxyAccessRejects_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalProxyAccessRejects(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalProxyAccessRejects_Add(p *radius.Packet, value FreeRADIUSTotalProxyAccessRejects) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 140, a) +} + +func FreeRADIUSTotalProxyAccessRejects_Get(p *radius.Packet) (value FreeRADIUSTotalProxyAccessRejects) { + value, _ = FreeRADIUSTotalProxyAccessRejects_Lookup(p) + return +} + +func FreeRADIUSTotalProxyAccessRejects_Gets(p *radius.Packet) (values []FreeRADIUSTotalProxyAccessRejects, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 140) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalProxyAccessRejects(i)) + } + return +} + +func FreeRADIUSTotalProxyAccessRejects_Lookup(p *radius.Packet) (value FreeRADIUSTotalProxyAccessRejects, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 140) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalProxyAccessRejects(i) + return +} + +func FreeRADIUSTotalProxyAccessRejects_Set(p *radius.Packet, value FreeRADIUSTotalProxyAccessRejects) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 140, a) +} + +func FreeRADIUSTotalProxyAccessRejects_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 140) +} + +type FreeRADIUSTotalProxyAccessChallenges uint32 + +var FreeRADIUSTotalProxyAccessChallenges_Strings = map[FreeRADIUSTotalProxyAccessChallenges]string{} + +func (a FreeRADIUSTotalProxyAccessChallenges) String() string { + if str, ok := FreeRADIUSTotalProxyAccessChallenges_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalProxyAccessChallenges(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalProxyAccessChallenges_Add(p *radius.Packet, value FreeRADIUSTotalProxyAccessChallenges) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 141, a) +} + +func FreeRADIUSTotalProxyAccessChallenges_Get(p *radius.Packet) (value FreeRADIUSTotalProxyAccessChallenges) { + value, _ = FreeRADIUSTotalProxyAccessChallenges_Lookup(p) + return +} + +func FreeRADIUSTotalProxyAccessChallenges_Gets(p *radius.Packet) (values []FreeRADIUSTotalProxyAccessChallenges, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 141) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalProxyAccessChallenges(i)) + } + return +} + +func FreeRADIUSTotalProxyAccessChallenges_Lookup(p *radius.Packet) (value FreeRADIUSTotalProxyAccessChallenges, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 141) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalProxyAccessChallenges(i) + return +} + +func FreeRADIUSTotalProxyAccessChallenges_Set(p *radius.Packet, value FreeRADIUSTotalProxyAccessChallenges) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 141, a) +} + +func FreeRADIUSTotalProxyAccessChallenges_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 141) +} + +type FreeRADIUSTotalProxyAuthResponses uint32 + +var FreeRADIUSTotalProxyAuthResponses_Strings = map[FreeRADIUSTotalProxyAuthResponses]string{} + +func (a FreeRADIUSTotalProxyAuthResponses) String() string { + if str, ok := FreeRADIUSTotalProxyAuthResponses_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalProxyAuthResponses(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalProxyAuthResponses_Add(p *radius.Packet, value FreeRADIUSTotalProxyAuthResponses) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 142, a) +} + +func FreeRADIUSTotalProxyAuthResponses_Get(p *radius.Packet) (value FreeRADIUSTotalProxyAuthResponses) { + value, _ = FreeRADIUSTotalProxyAuthResponses_Lookup(p) + return +} + +func FreeRADIUSTotalProxyAuthResponses_Gets(p *radius.Packet) (values []FreeRADIUSTotalProxyAuthResponses, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 142) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalProxyAuthResponses(i)) + } + return +} + +func FreeRADIUSTotalProxyAuthResponses_Lookup(p *radius.Packet) (value FreeRADIUSTotalProxyAuthResponses, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 142) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalProxyAuthResponses(i) + return +} + +func FreeRADIUSTotalProxyAuthResponses_Set(p *radius.Packet, value FreeRADIUSTotalProxyAuthResponses) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 142, a) +} + +func FreeRADIUSTotalProxyAuthResponses_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 142) +} + +type FreeRADIUSTotalProxyAuthDuplicateRequests uint32 + +var FreeRADIUSTotalProxyAuthDuplicateRequests_Strings = map[FreeRADIUSTotalProxyAuthDuplicateRequests]string{} + +func (a FreeRADIUSTotalProxyAuthDuplicateRequests) String() string { + if str, ok := FreeRADIUSTotalProxyAuthDuplicateRequests_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalProxyAuthDuplicateRequests(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalProxyAuthDuplicateRequests_Add(p *radius.Packet, value FreeRADIUSTotalProxyAuthDuplicateRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 143, a) +} + +func FreeRADIUSTotalProxyAuthDuplicateRequests_Get(p *radius.Packet) (value FreeRADIUSTotalProxyAuthDuplicateRequests) { + value, _ = FreeRADIUSTotalProxyAuthDuplicateRequests_Lookup(p) + return +} + +func FreeRADIUSTotalProxyAuthDuplicateRequests_Gets(p *radius.Packet) (values []FreeRADIUSTotalProxyAuthDuplicateRequests, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 143) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalProxyAuthDuplicateRequests(i)) + } + return +} + +func FreeRADIUSTotalProxyAuthDuplicateRequests_Lookup(p *radius.Packet) (value FreeRADIUSTotalProxyAuthDuplicateRequests, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 143) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalProxyAuthDuplicateRequests(i) + return +} + +func FreeRADIUSTotalProxyAuthDuplicateRequests_Set(p *radius.Packet, value FreeRADIUSTotalProxyAuthDuplicateRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 143, a) +} + +func FreeRADIUSTotalProxyAuthDuplicateRequests_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 143) +} + +type FreeRADIUSTotalProxyAuthMalformedRequests uint32 + +var FreeRADIUSTotalProxyAuthMalformedRequests_Strings = map[FreeRADIUSTotalProxyAuthMalformedRequests]string{} + +func (a FreeRADIUSTotalProxyAuthMalformedRequests) String() string { + if str, ok := FreeRADIUSTotalProxyAuthMalformedRequests_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalProxyAuthMalformedRequests(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalProxyAuthMalformedRequests_Add(p *radius.Packet, value FreeRADIUSTotalProxyAuthMalformedRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 144, a) +} + +func FreeRADIUSTotalProxyAuthMalformedRequests_Get(p *radius.Packet) (value FreeRADIUSTotalProxyAuthMalformedRequests) { + value, _ = FreeRADIUSTotalProxyAuthMalformedRequests_Lookup(p) + return +} + +func FreeRADIUSTotalProxyAuthMalformedRequests_Gets(p *radius.Packet) (values []FreeRADIUSTotalProxyAuthMalformedRequests, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 144) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalProxyAuthMalformedRequests(i)) + } + return +} + +func FreeRADIUSTotalProxyAuthMalformedRequests_Lookup(p *radius.Packet) (value FreeRADIUSTotalProxyAuthMalformedRequests, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 144) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalProxyAuthMalformedRequests(i) + return +} + +func FreeRADIUSTotalProxyAuthMalformedRequests_Set(p *radius.Packet, value FreeRADIUSTotalProxyAuthMalformedRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 144, a) +} + +func FreeRADIUSTotalProxyAuthMalformedRequests_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 144) +} + +type FreeRADIUSTotalProxyAuthInvalidRequests uint32 + +var FreeRADIUSTotalProxyAuthInvalidRequests_Strings = map[FreeRADIUSTotalProxyAuthInvalidRequests]string{} + +func (a FreeRADIUSTotalProxyAuthInvalidRequests) String() string { + if str, ok := FreeRADIUSTotalProxyAuthInvalidRequests_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalProxyAuthInvalidRequests(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalProxyAuthInvalidRequests_Add(p *radius.Packet, value FreeRADIUSTotalProxyAuthInvalidRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 145, a) +} + +func FreeRADIUSTotalProxyAuthInvalidRequests_Get(p *radius.Packet) (value FreeRADIUSTotalProxyAuthInvalidRequests) { + value, _ = FreeRADIUSTotalProxyAuthInvalidRequests_Lookup(p) + return +} + +func FreeRADIUSTotalProxyAuthInvalidRequests_Gets(p *radius.Packet) (values []FreeRADIUSTotalProxyAuthInvalidRequests, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 145) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalProxyAuthInvalidRequests(i)) + } + return +} + +func FreeRADIUSTotalProxyAuthInvalidRequests_Lookup(p *radius.Packet) (value FreeRADIUSTotalProxyAuthInvalidRequests, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 145) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalProxyAuthInvalidRequests(i) + return +} + +func FreeRADIUSTotalProxyAuthInvalidRequests_Set(p *radius.Packet, value FreeRADIUSTotalProxyAuthInvalidRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 145, a) +} + +func FreeRADIUSTotalProxyAuthInvalidRequests_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 145) +} + +type FreeRADIUSTotalProxyAuthDroppedRequests uint32 + +var FreeRADIUSTotalProxyAuthDroppedRequests_Strings = map[FreeRADIUSTotalProxyAuthDroppedRequests]string{} + +func (a FreeRADIUSTotalProxyAuthDroppedRequests) String() string { + if str, ok := FreeRADIUSTotalProxyAuthDroppedRequests_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalProxyAuthDroppedRequests(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalProxyAuthDroppedRequests_Add(p *radius.Packet, value FreeRADIUSTotalProxyAuthDroppedRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 146, a) +} + +func FreeRADIUSTotalProxyAuthDroppedRequests_Get(p *radius.Packet) (value FreeRADIUSTotalProxyAuthDroppedRequests) { + value, _ = FreeRADIUSTotalProxyAuthDroppedRequests_Lookup(p) + return +} + +func FreeRADIUSTotalProxyAuthDroppedRequests_Gets(p *radius.Packet) (values []FreeRADIUSTotalProxyAuthDroppedRequests, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 146) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalProxyAuthDroppedRequests(i)) + } + return +} + +func FreeRADIUSTotalProxyAuthDroppedRequests_Lookup(p *radius.Packet) (value FreeRADIUSTotalProxyAuthDroppedRequests, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 146) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalProxyAuthDroppedRequests(i) + return +} + +func FreeRADIUSTotalProxyAuthDroppedRequests_Set(p *radius.Packet, value FreeRADIUSTotalProxyAuthDroppedRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 146, a) +} + +func FreeRADIUSTotalProxyAuthDroppedRequests_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 146) +} + +type FreeRADIUSTotalProxyAuthUnknownTypes uint32 + +var FreeRADIUSTotalProxyAuthUnknownTypes_Strings = map[FreeRADIUSTotalProxyAuthUnknownTypes]string{} + +func (a FreeRADIUSTotalProxyAuthUnknownTypes) String() string { + if str, ok := FreeRADIUSTotalProxyAuthUnknownTypes_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalProxyAuthUnknownTypes(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalProxyAuthUnknownTypes_Add(p *radius.Packet, value FreeRADIUSTotalProxyAuthUnknownTypes) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 147, a) +} + +func FreeRADIUSTotalProxyAuthUnknownTypes_Get(p *radius.Packet) (value FreeRADIUSTotalProxyAuthUnknownTypes) { + value, _ = FreeRADIUSTotalProxyAuthUnknownTypes_Lookup(p) + return +} + +func FreeRADIUSTotalProxyAuthUnknownTypes_Gets(p *radius.Packet) (values []FreeRADIUSTotalProxyAuthUnknownTypes, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 147) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalProxyAuthUnknownTypes(i)) + } + return +} + +func FreeRADIUSTotalProxyAuthUnknownTypes_Lookup(p *radius.Packet) (value FreeRADIUSTotalProxyAuthUnknownTypes, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 147) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalProxyAuthUnknownTypes(i) + return +} + +func FreeRADIUSTotalProxyAuthUnknownTypes_Set(p *radius.Packet, value FreeRADIUSTotalProxyAuthUnknownTypes) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 147, a) +} + +func FreeRADIUSTotalProxyAuthUnknownTypes_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 147) +} + +type FreeRADIUSTotalAccountingRequests uint32 + +var FreeRADIUSTotalAccountingRequests_Strings = map[FreeRADIUSTotalAccountingRequests]string{} + +func (a FreeRADIUSTotalAccountingRequests) String() string { + if str, ok := FreeRADIUSTotalAccountingRequests_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalAccountingRequests(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalAccountingRequests_Add(p *radius.Packet, value FreeRADIUSTotalAccountingRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 148, a) +} + +func FreeRADIUSTotalAccountingRequests_Get(p *radius.Packet) (value FreeRADIUSTotalAccountingRequests) { + value, _ = FreeRADIUSTotalAccountingRequests_Lookup(p) + return +} + +func FreeRADIUSTotalAccountingRequests_Gets(p *radius.Packet) (values []FreeRADIUSTotalAccountingRequests, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 148) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalAccountingRequests(i)) + } + return +} + +func FreeRADIUSTotalAccountingRequests_Lookup(p *radius.Packet) (value FreeRADIUSTotalAccountingRequests, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 148) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalAccountingRequests(i) + return +} + +func FreeRADIUSTotalAccountingRequests_Set(p *radius.Packet, value FreeRADIUSTotalAccountingRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 148, a) +} + +func FreeRADIUSTotalAccountingRequests_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 148) +} + +type FreeRADIUSTotalAccountingResponses uint32 + +var FreeRADIUSTotalAccountingResponses_Strings = map[FreeRADIUSTotalAccountingResponses]string{} + +func (a FreeRADIUSTotalAccountingResponses) String() string { + if str, ok := FreeRADIUSTotalAccountingResponses_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalAccountingResponses(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalAccountingResponses_Add(p *radius.Packet, value FreeRADIUSTotalAccountingResponses) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 149, a) +} + +func FreeRADIUSTotalAccountingResponses_Get(p *radius.Packet) (value FreeRADIUSTotalAccountingResponses) { + value, _ = FreeRADIUSTotalAccountingResponses_Lookup(p) + return +} + +func FreeRADIUSTotalAccountingResponses_Gets(p *radius.Packet) (values []FreeRADIUSTotalAccountingResponses, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 149) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalAccountingResponses(i)) + } + return +} + +func FreeRADIUSTotalAccountingResponses_Lookup(p *radius.Packet) (value FreeRADIUSTotalAccountingResponses, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 149) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalAccountingResponses(i) + return +} + +func FreeRADIUSTotalAccountingResponses_Set(p *radius.Packet, value FreeRADIUSTotalAccountingResponses) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 149, a) +} + +func FreeRADIUSTotalAccountingResponses_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 149) +} + +type FreeRADIUSTotalAcctDuplicateRequests uint32 + +var FreeRADIUSTotalAcctDuplicateRequests_Strings = map[FreeRADIUSTotalAcctDuplicateRequests]string{} + +func (a FreeRADIUSTotalAcctDuplicateRequests) String() string { + if str, ok := FreeRADIUSTotalAcctDuplicateRequests_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalAcctDuplicateRequests(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalAcctDuplicateRequests_Add(p *radius.Packet, value FreeRADIUSTotalAcctDuplicateRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 150, a) +} + +func FreeRADIUSTotalAcctDuplicateRequests_Get(p *radius.Packet) (value FreeRADIUSTotalAcctDuplicateRequests) { + value, _ = FreeRADIUSTotalAcctDuplicateRequests_Lookup(p) + return +} + +func FreeRADIUSTotalAcctDuplicateRequests_Gets(p *radius.Packet) (values []FreeRADIUSTotalAcctDuplicateRequests, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 150) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalAcctDuplicateRequests(i)) + } + return +} + +func FreeRADIUSTotalAcctDuplicateRequests_Lookup(p *radius.Packet) (value FreeRADIUSTotalAcctDuplicateRequests, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 150) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalAcctDuplicateRequests(i) + return +} + +func FreeRADIUSTotalAcctDuplicateRequests_Set(p *radius.Packet, value FreeRADIUSTotalAcctDuplicateRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 150, a) +} + +func FreeRADIUSTotalAcctDuplicateRequests_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 150) +} + +type FreeRADIUSTotalAcctMalformedRequests uint32 + +var FreeRADIUSTotalAcctMalformedRequests_Strings = map[FreeRADIUSTotalAcctMalformedRequests]string{} + +func (a FreeRADIUSTotalAcctMalformedRequests) String() string { + if str, ok := FreeRADIUSTotalAcctMalformedRequests_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalAcctMalformedRequests(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalAcctMalformedRequests_Add(p *radius.Packet, value FreeRADIUSTotalAcctMalformedRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 151, a) +} + +func FreeRADIUSTotalAcctMalformedRequests_Get(p *radius.Packet) (value FreeRADIUSTotalAcctMalformedRequests) { + value, _ = FreeRADIUSTotalAcctMalformedRequests_Lookup(p) + return +} + +func FreeRADIUSTotalAcctMalformedRequests_Gets(p *radius.Packet) (values []FreeRADIUSTotalAcctMalformedRequests, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 151) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalAcctMalformedRequests(i)) + } + return +} + +func FreeRADIUSTotalAcctMalformedRequests_Lookup(p *radius.Packet) (value FreeRADIUSTotalAcctMalformedRequests, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 151) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalAcctMalformedRequests(i) + return +} + +func FreeRADIUSTotalAcctMalformedRequests_Set(p *radius.Packet, value FreeRADIUSTotalAcctMalformedRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 151, a) +} + +func FreeRADIUSTotalAcctMalformedRequests_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 151) +} + +type FreeRADIUSTotalAcctInvalidRequests uint32 + +var FreeRADIUSTotalAcctInvalidRequests_Strings = map[FreeRADIUSTotalAcctInvalidRequests]string{} + +func (a FreeRADIUSTotalAcctInvalidRequests) String() string { + if str, ok := FreeRADIUSTotalAcctInvalidRequests_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalAcctInvalidRequests(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalAcctInvalidRequests_Add(p *radius.Packet, value FreeRADIUSTotalAcctInvalidRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 152, a) +} + +func FreeRADIUSTotalAcctInvalidRequests_Get(p *radius.Packet) (value FreeRADIUSTotalAcctInvalidRequests) { + value, _ = FreeRADIUSTotalAcctInvalidRequests_Lookup(p) + return +} + +func FreeRADIUSTotalAcctInvalidRequests_Gets(p *radius.Packet) (values []FreeRADIUSTotalAcctInvalidRequests, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 152) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalAcctInvalidRequests(i)) + } + return +} + +func FreeRADIUSTotalAcctInvalidRequests_Lookup(p *radius.Packet) (value FreeRADIUSTotalAcctInvalidRequests, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 152) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalAcctInvalidRequests(i) + return +} + +func FreeRADIUSTotalAcctInvalidRequests_Set(p *radius.Packet, value FreeRADIUSTotalAcctInvalidRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 152, a) +} + +func FreeRADIUSTotalAcctInvalidRequests_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 152) +} + +type FreeRADIUSTotalAcctDroppedRequests uint32 + +var FreeRADIUSTotalAcctDroppedRequests_Strings = map[FreeRADIUSTotalAcctDroppedRequests]string{} + +func (a FreeRADIUSTotalAcctDroppedRequests) String() string { + if str, ok := FreeRADIUSTotalAcctDroppedRequests_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalAcctDroppedRequests(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalAcctDroppedRequests_Add(p *radius.Packet, value FreeRADIUSTotalAcctDroppedRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 153, a) +} + +func FreeRADIUSTotalAcctDroppedRequests_Get(p *radius.Packet) (value FreeRADIUSTotalAcctDroppedRequests) { + value, _ = FreeRADIUSTotalAcctDroppedRequests_Lookup(p) + return +} + +func FreeRADIUSTotalAcctDroppedRequests_Gets(p *radius.Packet) (values []FreeRADIUSTotalAcctDroppedRequests, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 153) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalAcctDroppedRequests(i)) + } + return +} + +func FreeRADIUSTotalAcctDroppedRequests_Lookup(p *radius.Packet) (value FreeRADIUSTotalAcctDroppedRequests, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 153) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalAcctDroppedRequests(i) + return +} + +func FreeRADIUSTotalAcctDroppedRequests_Set(p *radius.Packet, value FreeRADIUSTotalAcctDroppedRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 153, a) +} + +func FreeRADIUSTotalAcctDroppedRequests_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 153) +} + +type FreeRADIUSTotalAcctUnknownTypes uint32 + +var FreeRADIUSTotalAcctUnknownTypes_Strings = map[FreeRADIUSTotalAcctUnknownTypes]string{} + +func (a FreeRADIUSTotalAcctUnknownTypes) String() string { + if str, ok := FreeRADIUSTotalAcctUnknownTypes_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalAcctUnknownTypes(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalAcctUnknownTypes_Add(p *radius.Packet, value FreeRADIUSTotalAcctUnknownTypes) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 154, a) +} + +func FreeRADIUSTotalAcctUnknownTypes_Get(p *radius.Packet) (value FreeRADIUSTotalAcctUnknownTypes) { + value, _ = FreeRADIUSTotalAcctUnknownTypes_Lookup(p) + return +} + +func FreeRADIUSTotalAcctUnknownTypes_Gets(p *radius.Packet) (values []FreeRADIUSTotalAcctUnknownTypes, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 154) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalAcctUnknownTypes(i)) + } + return +} + +func FreeRADIUSTotalAcctUnknownTypes_Lookup(p *radius.Packet) (value FreeRADIUSTotalAcctUnknownTypes, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 154) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalAcctUnknownTypes(i) + return +} + +func FreeRADIUSTotalAcctUnknownTypes_Set(p *radius.Packet, value FreeRADIUSTotalAcctUnknownTypes) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 154, a) +} + +func FreeRADIUSTotalAcctUnknownTypes_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 154) +} + +type FreeRADIUSTotalProxyAccountingRequests uint32 + +var FreeRADIUSTotalProxyAccountingRequests_Strings = map[FreeRADIUSTotalProxyAccountingRequests]string{} + +func (a FreeRADIUSTotalProxyAccountingRequests) String() string { + if str, ok := FreeRADIUSTotalProxyAccountingRequests_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalProxyAccountingRequests(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalProxyAccountingRequests_Add(p *radius.Packet, value FreeRADIUSTotalProxyAccountingRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 155, a) +} + +func FreeRADIUSTotalProxyAccountingRequests_Get(p *radius.Packet) (value FreeRADIUSTotalProxyAccountingRequests) { + value, _ = FreeRADIUSTotalProxyAccountingRequests_Lookup(p) + return +} + +func FreeRADIUSTotalProxyAccountingRequests_Gets(p *radius.Packet) (values []FreeRADIUSTotalProxyAccountingRequests, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 155) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalProxyAccountingRequests(i)) + } + return +} + +func FreeRADIUSTotalProxyAccountingRequests_Lookup(p *radius.Packet) (value FreeRADIUSTotalProxyAccountingRequests, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 155) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalProxyAccountingRequests(i) + return +} + +func FreeRADIUSTotalProxyAccountingRequests_Set(p *radius.Packet, value FreeRADIUSTotalProxyAccountingRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 155, a) +} + +func FreeRADIUSTotalProxyAccountingRequests_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 155) +} + +type FreeRADIUSTotalProxyAccountingResponses uint32 + +var FreeRADIUSTotalProxyAccountingResponses_Strings = map[FreeRADIUSTotalProxyAccountingResponses]string{} + +func (a FreeRADIUSTotalProxyAccountingResponses) String() string { + if str, ok := FreeRADIUSTotalProxyAccountingResponses_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalProxyAccountingResponses(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalProxyAccountingResponses_Add(p *radius.Packet, value FreeRADIUSTotalProxyAccountingResponses) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 156, a) +} + +func FreeRADIUSTotalProxyAccountingResponses_Get(p *radius.Packet) (value FreeRADIUSTotalProxyAccountingResponses) { + value, _ = FreeRADIUSTotalProxyAccountingResponses_Lookup(p) + return +} + +func FreeRADIUSTotalProxyAccountingResponses_Gets(p *radius.Packet) (values []FreeRADIUSTotalProxyAccountingResponses, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 156) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalProxyAccountingResponses(i)) + } + return +} + +func FreeRADIUSTotalProxyAccountingResponses_Lookup(p *radius.Packet) (value FreeRADIUSTotalProxyAccountingResponses, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 156) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalProxyAccountingResponses(i) + return +} + +func FreeRADIUSTotalProxyAccountingResponses_Set(p *radius.Packet, value FreeRADIUSTotalProxyAccountingResponses) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 156, a) +} + +func FreeRADIUSTotalProxyAccountingResponses_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 156) +} + +type FreeRADIUSTotalProxyAcctDuplicateRequests uint32 + +var FreeRADIUSTotalProxyAcctDuplicateRequests_Strings = map[FreeRADIUSTotalProxyAcctDuplicateRequests]string{} + +func (a FreeRADIUSTotalProxyAcctDuplicateRequests) String() string { + if str, ok := FreeRADIUSTotalProxyAcctDuplicateRequests_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalProxyAcctDuplicateRequests(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalProxyAcctDuplicateRequests_Add(p *radius.Packet, value FreeRADIUSTotalProxyAcctDuplicateRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 157, a) +} + +func FreeRADIUSTotalProxyAcctDuplicateRequests_Get(p *radius.Packet) (value FreeRADIUSTotalProxyAcctDuplicateRequests) { + value, _ = FreeRADIUSTotalProxyAcctDuplicateRequests_Lookup(p) + return +} + +func FreeRADIUSTotalProxyAcctDuplicateRequests_Gets(p *radius.Packet) (values []FreeRADIUSTotalProxyAcctDuplicateRequests, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 157) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalProxyAcctDuplicateRequests(i)) + } + return +} + +func FreeRADIUSTotalProxyAcctDuplicateRequests_Lookup(p *radius.Packet) (value FreeRADIUSTotalProxyAcctDuplicateRequests, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 157) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalProxyAcctDuplicateRequests(i) + return +} + +func FreeRADIUSTotalProxyAcctDuplicateRequests_Set(p *radius.Packet, value FreeRADIUSTotalProxyAcctDuplicateRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 157, a) +} + +func FreeRADIUSTotalProxyAcctDuplicateRequests_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 157) +} + +type FreeRADIUSTotalProxyAcctMalformedRequests uint32 + +var FreeRADIUSTotalProxyAcctMalformedRequests_Strings = map[FreeRADIUSTotalProxyAcctMalformedRequests]string{} + +func (a FreeRADIUSTotalProxyAcctMalformedRequests) String() string { + if str, ok := FreeRADIUSTotalProxyAcctMalformedRequests_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalProxyAcctMalformedRequests(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalProxyAcctMalformedRequests_Add(p *radius.Packet, value FreeRADIUSTotalProxyAcctMalformedRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 158, a) +} + +func FreeRADIUSTotalProxyAcctMalformedRequests_Get(p *radius.Packet) (value FreeRADIUSTotalProxyAcctMalformedRequests) { + value, _ = FreeRADIUSTotalProxyAcctMalformedRequests_Lookup(p) + return +} + +func FreeRADIUSTotalProxyAcctMalformedRequests_Gets(p *radius.Packet) (values []FreeRADIUSTotalProxyAcctMalformedRequests, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 158) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalProxyAcctMalformedRequests(i)) + } + return +} + +func FreeRADIUSTotalProxyAcctMalformedRequests_Lookup(p *radius.Packet) (value FreeRADIUSTotalProxyAcctMalformedRequests, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 158) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalProxyAcctMalformedRequests(i) + return +} + +func FreeRADIUSTotalProxyAcctMalformedRequests_Set(p *radius.Packet, value FreeRADIUSTotalProxyAcctMalformedRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 158, a) +} + +func FreeRADIUSTotalProxyAcctMalformedRequests_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 158) +} + +type FreeRADIUSTotalProxyAcctInvalidRequests uint32 + +var FreeRADIUSTotalProxyAcctInvalidRequests_Strings = map[FreeRADIUSTotalProxyAcctInvalidRequests]string{} + +func (a FreeRADIUSTotalProxyAcctInvalidRequests) String() string { + if str, ok := FreeRADIUSTotalProxyAcctInvalidRequests_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalProxyAcctInvalidRequests(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalProxyAcctInvalidRequests_Add(p *radius.Packet, value FreeRADIUSTotalProxyAcctInvalidRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 159, a) +} + +func FreeRADIUSTotalProxyAcctInvalidRequests_Get(p *radius.Packet) (value FreeRADIUSTotalProxyAcctInvalidRequests) { + value, _ = FreeRADIUSTotalProxyAcctInvalidRequests_Lookup(p) + return +} + +func FreeRADIUSTotalProxyAcctInvalidRequests_Gets(p *radius.Packet) (values []FreeRADIUSTotalProxyAcctInvalidRequests, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 159) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalProxyAcctInvalidRequests(i)) + } + return +} + +func FreeRADIUSTotalProxyAcctInvalidRequests_Lookup(p *radius.Packet) (value FreeRADIUSTotalProxyAcctInvalidRequests, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 159) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalProxyAcctInvalidRequests(i) + return +} + +func FreeRADIUSTotalProxyAcctInvalidRequests_Set(p *radius.Packet, value FreeRADIUSTotalProxyAcctInvalidRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 159, a) +} + +func FreeRADIUSTotalProxyAcctInvalidRequests_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 159) +} + +type FreeRADIUSTotalProxyAcctDroppedRequests uint32 + +var FreeRADIUSTotalProxyAcctDroppedRequests_Strings = map[FreeRADIUSTotalProxyAcctDroppedRequests]string{} + +func (a FreeRADIUSTotalProxyAcctDroppedRequests) String() string { + if str, ok := FreeRADIUSTotalProxyAcctDroppedRequests_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalProxyAcctDroppedRequests(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalProxyAcctDroppedRequests_Add(p *radius.Packet, value FreeRADIUSTotalProxyAcctDroppedRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 160, a) +} + +func FreeRADIUSTotalProxyAcctDroppedRequests_Get(p *radius.Packet) (value FreeRADIUSTotalProxyAcctDroppedRequests) { + value, _ = FreeRADIUSTotalProxyAcctDroppedRequests_Lookup(p) + return +} + +func FreeRADIUSTotalProxyAcctDroppedRequests_Gets(p *radius.Packet) (values []FreeRADIUSTotalProxyAcctDroppedRequests, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 160) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalProxyAcctDroppedRequests(i)) + } + return +} + +func FreeRADIUSTotalProxyAcctDroppedRequests_Lookup(p *radius.Packet) (value FreeRADIUSTotalProxyAcctDroppedRequests, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 160) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalProxyAcctDroppedRequests(i) + return +} + +func FreeRADIUSTotalProxyAcctDroppedRequests_Set(p *radius.Packet, value FreeRADIUSTotalProxyAcctDroppedRequests) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 160, a) +} + +func FreeRADIUSTotalProxyAcctDroppedRequests_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 160) +} + +type FreeRADIUSTotalProxyAcctUnknownTypes uint32 + +var FreeRADIUSTotalProxyAcctUnknownTypes_Strings = map[FreeRADIUSTotalProxyAcctUnknownTypes]string{} + +func (a FreeRADIUSTotalProxyAcctUnknownTypes) String() string { + if str, ok := FreeRADIUSTotalProxyAcctUnknownTypes_Strings[a]; ok { + return str + } + return "FreeRADIUSTotalProxyAcctUnknownTypes(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSTotalProxyAcctUnknownTypes_Add(p *radius.Packet, value FreeRADIUSTotalProxyAcctUnknownTypes) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 161, a) +} + +func FreeRADIUSTotalProxyAcctUnknownTypes_Get(p *radius.Packet) (value FreeRADIUSTotalProxyAcctUnknownTypes) { + value, _ = FreeRADIUSTotalProxyAcctUnknownTypes_Lookup(p) + return +} + +func FreeRADIUSTotalProxyAcctUnknownTypes_Gets(p *radius.Packet) (values []FreeRADIUSTotalProxyAcctUnknownTypes, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 161) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSTotalProxyAcctUnknownTypes(i)) + } + return +} + +func FreeRADIUSTotalProxyAcctUnknownTypes_Lookup(p *radius.Packet) (value FreeRADIUSTotalProxyAcctUnknownTypes, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 161) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSTotalProxyAcctUnknownTypes(i) + return +} + +func FreeRADIUSTotalProxyAcctUnknownTypes_Set(p *radius.Packet, value FreeRADIUSTotalProxyAcctUnknownTypes) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 161, a) +} + +func FreeRADIUSTotalProxyAcctUnknownTypes_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 161) +} + +type FreeRADIUSQueueLenInternal uint32 + +var FreeRADIUSQueueLenInternal_Strings = map[FreeRADIUSQueueLenInternal]string{} + +func (a FreeRADIUSQueueLenInternal) String() string { + if str, ok := FreeRADIUSQueueLenInternal_Strings[a]; ok { + return str + } + return "FreeRADIUSQueueLenInternal(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSQueueLenInternal_Add(p *radius.Packet, value FreeRADIUSQueueLenInternal) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 162, a) +} + +func FreeRADIUSQueueLenInternal_Get(p *radius.Packet) (value FreeRADIUSQueueLenInternal) { + value, _ = FreeRADIUSQueueLenInternal_Lookup(p) + return +} + +func FreeRADIUSQueueLenInternal_Gets(p *radius.Packet) (values []FreeRADIUSQueueLenInternal, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 162) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSQueueLenInternal(i)) + } + return +} + +func FreeRADIUSQueueLenInternal_Lookup(p *radius.Packet) (value FreeRADIUSQueueLenInternal, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 162) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSQueueLenInternal(i) + return +} + +func FreeRADIUSQueueLenInternal_Set(p *radius.Packet, value FreeRADIUSQueueLenInternal) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 162, a) +} + +func FreeRADIUSQueueLenInternal_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 162) +} + +type FreeRADIUSQueueLenProxy uint32 + +var FreeRADIUSQueueLenProxy_Strings = map[FreeRADIUSQueueLenProxy]string{} + +func (a FreeRADIUSQueueLenProxy) String() string { + if str, ok := FreeRADIUSQueueLenProxy_Strings[a]; ok { + return str + } + return "FreeRADIUSQueueLenProxy(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSQueueLenProxy_Add(p *radius.Packet, value FreeRADIUSQueueLenProxy) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 163, a) +} + +func FreeRADIUSQueueLenProxy_Get(p *radius.Packet) (value FreeRADIUSQueueLenProxy) { + value, _ = FreeRADIUSQueueLenProxy_Lookup(p) + return +} + +func FreeRADIUSQueueLenProxy_Gets(p *radius.Packet) (values []FreeRADIUSQueueLenProxy, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 163) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSQueueLenProxy(i)) + } + return +} + +func FreeRADIUSQueueLenProxy_Lookup(p *radius.Packet) (value FreeRADIUSQueueLenProxy, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 163) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSQueueLenProxy(i) + return +} + +func FreeRADIUSQueueLenProxy_Set(p *radius.Packet, value FreeRADIUSQueueLenProxy) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 163, a) +} + +func FreeRADIUSQueueLenProxy_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 163) +} + +type FreeRADIUSQueueLenAuth uint32 + +var FreeRADIUSQueueLenAuth_Strings = map[FreeRADIUSQueueLenAuth]string{} + +func (a FreeRADIUSQueueLenAuth) String() string { + if str, ok := FreeRADIUSQueueLenAuth_Strings[a]; ok { + return str + } + return "FreeRADIUSQueueLenAuth(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSQueueLenAuth_Add(p *radius.Packet, value FreeRADIUSQueueLenAuth) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 164, a) +} + +func FreeRADIUSQueueLenAuth_Get(p *radius.Packet) (value FreeRADIUSQueueLenAuth) { + value, _ = FreeRADIUSQueueLenAuth_Lookup(p) + return +} + +func FreeRADIUSQueueLenAuth_Gets(p *radius.Packet) (values []FreeRADIUSQueueLenAuth, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 164) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSQueueLenAuth(i)) + } + return +} + +func FreeRADIUSQueueLenAuth_Lookup(p *radius.Packet) (value FreeRADIUSQueueLenAuth, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 164) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSQueueLenAuth(i) + return +} + +func FreeRADIUSQueueLenAuth_Set(p *radius.Packet, value FreeRADIUSQueueLenAuth) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 164, a) +} + +func FreeRADIUSQueueLenAuth_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 164) +} + +type FreeRADIUSQueueLenAcct uint32 + +var FreeRADIUSQueueLenAcct_Strings = map[FreeRADIUSQueueLenAcct]string{} + +func (a FreeRADIUSQueueLenAcct) String() string { + if str, ok := FreeRADIUSQueueLenAcct_Strings[a]; ok { + return str + } + return "FreeRADIUSQueueLenAcct(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSQueueLenAcct_Add(p *radius.Packet, value FreeRADIUSQueueLenAcct) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 165, a) +} + +func FreeRADIUSQueueLenAcct_Get(p *radius.Packet) (value FreeRADIUSQueueLenAcct) { + value, _ = FreeRADIUSQueueLenAcct_Lookup(p) + return +} + +func FreeRADIUSQueueLenAcct_Gets(p *radius.Packet) (values []FreeRADIUSQueueLenAcct, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 165) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSQueueLenAcct(i)) + } + return +} + +func FreeRADIUSQueueLenAcct_Lookup(p *radius.Packet) (value FreeRADIUSQueueLenAcct, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 165) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSQueueLenAcct(i) + return +} + +func FreeRADIUSQueueLenAcct_Set(p *radius.Packet, value FreeRADIUSQueueLenAcct) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 165, a) +} + +func FreeRADIUSQueueLenAcct_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 165) +} + +type FreeRADIUSQueueLenDetail uint32 + +var FreeRADIUSQueueLenDetail_Strings = map[FreeRADIUSQueueLenDetail]string{} + +func (a FreeRADIUSQueueLenDetail) String() string { + if str, ok := FreeRADIUSQueueLenDetail_Strings[a]; ok { + return str + } + return "FreeRADIUSQueueLenDetail(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSQueueLenDetail_Add(p *radius.Packet, value FreeRADIUSQueueLenDetail) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 166, a) +} + +func FreeRADIUSQueueLenDetail_Get(p *radius.Packet) (value FreeRADIUSQueueLenDetail) { + value, _ = FreeRADIUSQueueLenDetail_Lookup(p) + return +} + +func FreeRADIUSQueueLenDetail_Gets(p *radius.Packet) (values []FreeRADIUSQueueLenDetail, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 166) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSQueueLenDetail(i)) + } + return +} + +func FreeRADIUSQueueLenDetail_Lookup(p *radius.Packet) (value FreeRADIUSQueueLenDetail, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 166) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSQueueLenDetail(i) + return +} + +func FreeRADIUSQueueLenDetail_Set(p *radius.Packet, value FreeRADIUSQueueLenDetail) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 166, a) +} + +func FreeRADIUSQueueLenDetail_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 166) +} + +func FreeRADIUSStatsStartTime_Add(p *radius.Packet, value time.Time) (err error) { + var a radius.Attribute + a, err = radius.NewDate(value) + if err != nil { + return + } + return _FreeRADIUS_AddVendor(p, 176, a) +} + +func FreeRADIUSStatsStartTime_Get(p *radius.Packet) (value time.Time) { + value, _ = FreeRADIUSStatsStartTime_Lookup(p) + return +} + +func FreeRADIUSStatsStartTime_Gets(p *radius.Packet) (values []time.Time, err error) { + var i time.Time + for _, attr := range _FreeRADIUS_GetsVendor(p, 176) { + i, err = radius.Date(attr) + if err != nil { + return + } + values = append(values, i) + } + return +} + +func FreeRADIUSStatsStartTime_Lookup(p *radius.Packet) (value time.Time, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 176) + if !ok { + err = radius.ErrNoAttribute + return + } + value, err = radius.Date(a) + return +} + +func FreeRADIUSStatsStartTime_Set(p *radius.Packet, value time.Time) (err error) { + var a radius.Attribute + a, err = radius.NewDate(value) + if err != nil { + return + } + return _FreeRADIUS_SetVendor(p, 176, a) +} + +func FreeRADIUSStatsStartTime_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 176) +} + +func FreeRADIUSStatsHUPTime_Add(p *radius.Packet, value time.Time) (err error) { + var a radius.Attribute + a, err = radius.NewDate(value) + if err != nil { + return + } + return _FreeRADIUS_AddVendor(p, 177, a) +} + +func FreeRADIUSStatsHUPTime_Get(p *radius.Packet) (value time.Time) { + value, _ = FreeRADIUSStatsHUPTime_Lookup(p) + return +} + +func FreeRADIUSStatsHUPTime_Gets(p *radius.Packet) (values []time.Time, err error) { + var i time.Time + for _, attr := range _FreeRADIUS_GetsVendor(p, 177) { + i, err = radius.Date(attr) + if err != nil { + return + } + values = append(values, i) + } + return +} + +func FreeRADIUSStatsHUPTime_Lookup(p *radius.Packet) (value time.Time, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 177) + if !ok { + err = radius.ErrNoAttribute + return + } + value, err = radius.Date(a) + return +} + +func FreeRADIUSStatsHUPTime_Set(p *radius.Packet, value time.Time) (err error) { + var a radius.Attribute + a, err = radius.NewDate(value) + if err != nil { + return + } + return _FreeRADIUS_SetVendor(p, 177, a) +} + +func FreeRADIUSStatsHUPTime_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 177) +} + +type FreeRADIUSQueuePPSIn uint32 + +var FreeRADIUSQueuePPSIn_Strings = map[FreeRADIUSQueuePPSIn]string{} + +func (a FreeRADIUSQueuePPSIn) String() string { + if str, ok := FreeRADIUSQueuePPSIn_Strings[a]; ok { + return str + } + return "FreeRADIUSQueuePPSIn(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSQueuePPSIn_Add(p *radius.Packet, value FreeRADIUSQueuePPSIn) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 181, a) +} + +func FreeRADIUSQueuePPSIn_Get(p *radius.Packet) (value FreeRADIUSQueuePPSIn) { + value, _ = FreeRADIUSQueuePPSIn_Lookup(p) + return +} + +func FreeRADIUSQueuePPSIn_Gets(p *radius.Packet) (values []FreeRADIUSQueuePPSIn, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 181) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSQueuePPSIn(i)) + } + return +} + +func FreeRADIUSQueuePPSIn_Lookup(p *radius.Packet) (value FreeRADIUSQueuePPSIn, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 181) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSQueuePPSIn(i) + return +} + +func FreeRADIUSQueuePPSIn_Set(p *radius.Packet, value FreeRADIUSQueuePPSIn) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 181, a) +} + +func FreeRADIUSQueuePPSIn_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 181) +} + +type FreeRADIUSQueuePPSOut uint32 + +var FreeRADIUSQueuePPSOut_Strings = map[FreeRADIUSQueuePPSOut]string{} + +func (a FreeRADIUSQueuePPSOut) String() string { + if str, ok := FreeRADIUSQueuePPSOut_Strings[a]; ok { + return str + } + return "FreeRADIUSQueuePPSOut(" + strconv.FormatUint(uint64(a), 10) + ")" +} + +func FreeRADIUSQueuePPSOut_Add(p *radius.Packet, value FreeRADIUSQueuePPSOut) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_AddVendor(p, 182, a) +} + +func FreeRADIUSQueuePPSOut_Get(p *radius.Packet) (value FreeRADIUSQueuePPSOut) { + value, _ = FreeRADIUSQueuePPSOut_Lookup(p) + return +} + +func FreeRADIUSQueuePPSOut_Gets(p *radius.Packet) (values []FreeRADIUSQueuePPSOut, err error) { + var i uint32 + for _, attr := range _FreeRADIUS_GetsVendor(p, 182) { + i, err = radius.Integer(attr) + if err != nil { + return + } + values = append(values, FreeRADIUSQueuePPSOut(i)) + } + return +} + +func FreeRADIUSQueuePPSOut_Lookup(p *radius.Packet) (value FreeRADIUSQueuePPSOut, err error) { + a, ok := _FreeRADIUS_LookupVendor(p, 182) + if !ok { + err = radius.ErrNoAttribute + return + } + var i uint32 + i, err = radius.Integer(a) + if err != nil { + return + } + value = FreeRADIUSQueuePPSOut(i) + return +} + +func FreeRADIUSQueuePPSOut_Set(p *radius.Packet, value FreeRADIUSQueuePPSOut) (err error) { + a := radius.NewInteger(uint32(value)) + return _FreeRADIUS_SetVendor(p, 182, a) +} + +func FreeRADIUSQueuePPSOut_Del(p *radius.Packet) { + _FreeRADIUS_DelVendor(p, 182) +} diff --git a/src/go/collectors/go.d.plugin/modules/freeradius/charts.go b/src/go/collectors/go.d.plugin/modules/freeradius/charts.go new file mode 100644 index 000000000..18732c944 --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/freeradius/charts.go @@ -0,0 +1,139 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +package freeradius + +import "github.com/netdata/netdata/go/go.d.plugin/agent/module" + +type ( + // Charts is an alias for module.Charts + Charts = module.Charts + // Dims is an alias for module.Dims + Dims = module.Dims +) + +var charts = Charts{ + { + ID: "authentication", + Title: "Authentication", + Units: "packets/s", + Fam: "authentication", + Ctx: "freeradius.authentication", + Dims: Dims{ + {ID: "access-requests", Name: "requests", Algo: module.Incremental}, + {ID: "auth-responses", Name: "responses", Algo: module.Incremental}, + }, + }, + { + ID: "authentication_responses", + Title: "Authentication Responses", + Units: "packets/s", + Fam: "authentication", + Ctx: "freeradius.authentication_access_responses", + Dims: Dims{ + {ID: "access-accepts", Name: "accepts", Algo: module.Incremental}, + {ID: "access-rejects", Name: "rejects", Algo: module.Incremental}, + {ID: "access-challenges", Name: "challenges", Algo: module.Incremental}, + }, + }, + { + ID: "bad_authentication_requests", + Title: "Bad Authentication Requests", + Units: "packets/s", + Fam: "authentication", + Ctx: "freeradius.bad_authentication", + Dims: Dims{ + {ID: "auth-dropped-requests", Name: "dropped", Algo: module.Incremental}, + {ID: "auth-duplicate-requests", Name: "duplicate", Algo: module.Incremental}, + {ID: "auth-invalid-requests", Name: "invalid", Algo: module.Incremental}, + {ID: "auth-malformed-requests", Name: "malformed", Algo: module.Incremental}, + {ID: "auth-unknown-types", Name: "unknown-types", Algo: module.Incremental}, + }, + }, + { + ID: "proxy_authentication", + Title: "Authentication", + Units: "packets/s", + Fam: "proxy authentication", + Ctx: "freeradius.proxy_authentication", + Dims: Dims{ + {ID: "proxy-access-requests", Name: "requests", Algo: module.Incremental}, + {ID: "proxy-auth-responses", Name: "responses", Algo: module.Incremental}, + }, + }, + { + ID: "proxy_authentication_responses", + Title: "Authentication Responses", + Units: "packets/s", + Fam: "proxy authentication", + Ctx: "freeradius.proxy_authentication_access_responses", + Dims: Dims{ + {ID: "proxy-access-accepts", Name: "accepts", Algo: module.Incremental}, + {ID: "proxy-access-rejects", Name: "rejects", Algo: module.Incremental}, + {ID: "proxy-access-challenges", Name: "challenges", Algo: module.Incremental}, + }, + }, + { + ID: "bad_proxy_authentication_requests", + Title: "Bad Authentication Requests", + Units: "packets/s", + Fam: "proxy authentication", + Ctx: "freeradius.proxy_bad_authentication", + Dims: Dims{ + {ID: "proxy-auth-dropped-requests", Name: "dropped", Algo: module.Incremental}, + {ID: "proxy-auth-duplicate-requests", Name: "duplicate", Algo: module.Incremental}, + {ID: "proxy-auth-invalid-requests", Name: "invalid", Algo: module.Incremental}, + {ID: "proxy-auth-malformed-requests", Name: "malformed", Algo: module.Incremental}, + {ID: "proxy-auth-unknown-types", Name: "unknown-types", Algo: module.Incremental}, + }, + }, + { + ID: "accounting", + Title: "Accounting", + Units: "packets/s", + Fam: "accounting", + Ctx: "freeradius.accounting", + Dims: Dims{ + {ID: "accounting-requests", Name: "requests", Algo: module.Incremental}, + {ID: "accounting-responses", Name: "responses", Algo: module.Incremental}, + }, + }, + { + ID: "bad_accounting_requests", + Title: "Bad Accounting Requests", + Units: "packets/s", + Fam: "accounting", + Ctx: "freeradius.bad_accounting", + Dims: Dims{ + {ID: "acct-dropped-requests", Name: "dropped", Algo: module.Incremental}, + {ID: "acct-duplicate-requests", Name: "duplicate", Algo: module.Incremental}, + {ID: "acct-invalid-requests", Name: "invalid", Algo: module.Incremental}, + {ID: "acct-malformed-requests", Name: "malformed", Algo: module.Incremental}, + {ID: "acct-unknown-types", Name: "unknown-types", Algo: module.Incremental}, + }, + }, + { + ID: "proxy_accounting", + Title: "Accounting", + Units: "packets/s", + Fam: "proxy accounting", + Ctx: "freeradius.proxy_accounting", + Dims: Dims{ + {ID: "proxy-accounting-requests", Name: "requests", Algo: module.Incremental}, + {ID: "proxy-accounting-responses", Name: "responses", Algo: module.Incremental}, + }, + }, + { + ID: "bad_proxy_accounting_requests", + Title: "Bad Accounting Requests", + Units: "packets/s", + Fam: "proxy accounting", + Ctx: "freeradius.proxy_bad_accounting", + Dims: Dims{ + {ID: "proxy-acct-dropped-requests", Name: "dropped", Algo: module.Incremental}, + {ID: "proxy-acct-duplicate-requests", Name: "duplicate", Algo: module.Incremental}, + {ID: "proxy-acct-invalid-requests", Name: "invalid", Algo: module.Incremental}, + {ID: "proxy-acct-malformed-requests", Name: "malformed", Algo: module.Incremental}, + {ID: "proxy-acct-unknown-types", Name: "unknown-types", Algo: module.Incremental}, + }, + }, +} diff --git a/src/go/collectors/go.d.plugin/modules/freeradius/collect.go b/src/go/collectors/go.d.plugin/modules/freeradius/collect.go new file mode 100644 index 000000000..8ec4bf46b --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/freeradius/collect.go @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +package freeradius + +import ( + "github.com/netdata/netdata/go/go.d.plugin/pkg/stm" +) + +func (f *FreeRADIUS) collect() (map[string]int64, error) { + status, err := f.client.Status() + if err != nil { + return nil, err + } + + return stm.ToMap(status), nil +} diff --git a/src/go/collectors/go.d.plugin/modules/freeradius/config_schema.json b/src/go/collectors/go.d.plugin/modules/freeradius/config_schema.json new file mode 100644 index 000000000..7e1a3a4e9 --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/freeradius/config_schema.json @@ -0,0 +1,60 @@ +{ + "jsonSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "FreeRADIUS collector configuration.", + "type": "object", + "properties": { + "update_every": { + "title": "Update every", + "description": "Data collection interval, measured in seconds.", + "type": "integer", + "minimum": 1, + "default": 1 + }, + "address": { + "title": "Address", + "description": "Server address.", + "type": "string", + "default": "127.0.0.1" + }, + "port": { + "title": "Port", + "description": "Server port.", + "type": "integer", + "default": 18121 + }, + "timeout": { + "title": "Timeout", + "description": "Timeout for establishing a connection and communication (reading and writing) in seconds.", + "type": "number", + "minimum": 0.5, + "default": 1 + }, + "secret": { + "title": "Secret", + "description": "Shared secret key.", + "type": "string" + } + }, + "required": [ + "address", + "port", + "secret" + ], + "additionalProperties": false, + "patternProperties": { + "^name$": {} + } + }, + "uiSchema": { + "uiOptions": { + "fullPage": true + }, + "timeout": { + "ui:help": "Accepts decimals for precise control (e.g., type 1.5 for 1.5 seconds)." + }, + "secret": { + "ui:widget": "password" + } + } +} diff --git a/src/go/collectors/go.d.plugin/modules/freeradius/freeradius.go b/src/go/collectors/go.d.plugin/modules/freeradius/freeradius.go new file mode 100644 index 000000000..c9ce35143 --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/freeradius/freeradius.go @@ -0,0 +1,106 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +package freeradius + +import ( + _ "embed" + "errors" + "time" + + "github.com/netdata/netdata/go/go.d.plugin/agent/module" + "github.com/netdata/netdata/go/go.d.plugin/modules/freeradius/api" + "github.com/netdata/netdata/go/go.d.plugin/pkg/web" +) + +//go:embed "config_schema.json" +var configSchema string + +func init() { + module.Register("freeradius", module.Creator{ + JobConfigSchema: configSchema, + Create: func() module.Module { return New() }, + Config: func() any { return &Config{} }, + }) +} + +func New() *FreeRADIUS { + return &FreeRADIUS{ + Config: Config{ + Address: "127.0.0.1", + Port: 18121, + Secret: "adminsecret", + Timeout: web.Duration(time.Second), + }, + } +} + +type Config struct { + UpdateEvery int `yaml:"update_every" json:"update_every"` + Address string `yaml:"address" json:"address"` + Port int `yaml:"port" json:"port"` + Secret string `yaml:"secret" json:"secret"` + Timeout web.Duration `yaml:"timeout" json:"timeout"` +} + +type ( + FreeRADIUS struct { + module.Base + Config `yaml:",inline" json:""` + + client + } + client interface { + Status() (*api.Status, error) + } +) + +func (f *FreeRADIUS) Configuration() any { + return f.Config +} + +func (f *FreeRADIUS) Init() error { + if err := f.validateConfig(); err != nil { + f.Errorf("config validation: %v", err) + return err + } + + f.client = api.New(api.Config{ + Address: f.Address, + Port: f.Port, + Secret: f.Secret, + Timeout: f.Timeout.Duration(), + }) + + return nil +} + +func (f *FreeRADIUS) Check() error { + mx, err := f.collect() + if err != nil { + f.Error(err) + return err + } + if len(mx) == 0 { + return errors.New("no metrics collected") + + } + return nil +} + +func (f *FreeRADIUS) Charts() *Charts { + return charts.Copy() +} + +func (f *FreeRADIUS) Collect() map[string]int64 { + mx, err := f.collect() + if err != nil { + f.Error(err) + } + + if len(mx) == 0 { + return nil + } + return mx +} + +func (f *FreeRADIUS) Cleanup() {} diff --git a/src/go/collectors/go.d.plugin/modules/freeradius/freeradius_test.go b/src/go/collectors/go.d.plugin/modules/freeradius/freeradius_test.go new file mode 100644 index 000000000..bf061e01e --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/freeradius/freeradius_test.go @@ -0,0 +1,204 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +package freeradius + +import ( + "errors" + "os" + "testing" + + "github.com/netdata/netdata/go/go.d.plugin/agent/module" + "github.com/netdata/netdata/go/go.d.plugin/modules/freeradius/api" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +var ( + dataConfigJSON, _ = os.ReadFile("testdata/config.json") + dataConfigYAML, _ = os.ReadFile("testdata/config.yaml") +) + +func Test_testDataIsValid(t *testing.T) { + for name, data := range map[string][]byte{ + "dataConfigJSON": dataConfigJSON, + "dataConfigYAML": dataConfigYAML, + } { + require.NotNil(t, data, name) + } +} + +func TestFreeRADIUS_ConfigurationSerialize(t *testing.T) { + module.TestConfigurationSerialize(t, &FreeRADIUS{}, dataConfigJSON, dataConfigYAML) +} + +func TestFreeRADIUS_Init(t *testing.T) { + freeRADIUS := New() + + assert.NoError(t, freeRADIUS.Init()) +} + +func TestFreeRADIUS_Init_ReturnsFalseIfAddressNotSet(t *testing.T) { + freeRADIUS := New() + freeRADIUS.Address = "" + + assert.Error(t, freeRADIUS.Init()) +} + +func TestFreeRADIUS_Init_ReturnsFalseIfPortNotSet(t *testing.T) { + freeRADIUS := New() + freeRADIUS.Port = 0 + + assert.Error(t, freeRADIUS.Init()) +} + +func TestFreeRADIUS_Init_ReturnsFalseIfSecretNotSet(t *testing.T) { + freeRADIUS := New() + freeRADIUS.Secret = "" + + assert.Error(t, freeRADIUS.Init()) +} + +func TestFreeRADIUS_Check(t *testing.T) { + freeRADIUS := New() + freeRADIUS.client = newOKMockClient() + + assert.NoError(t, freeRADIUS.Check()) +} + +func TestFreeRADIUS_Check_ReturnsFalseIfClientStatusReturnsError(t *testing.T) { + freeRADIUS := New() + freeRADIUS.client = newErrorMockClient() + + assert.Error(t, freeRADIUS.Check()) +} + +func TestFreeRADIUS_Charts(t *testing.T) { + assert.NotNil(t, New().Charts()) +} + +func TestFreeRADIUS_Collect(t *testing.T) { + freeRADIUS := New() + freeRADIUS.client = newOKMockClient() + + expected := map[string]int64{ + "access-requests": 1, + "access-accepts": 2, + "access-rejects": 3, + "access-challenges": 4, + "auth-responses": 5, + "auth-duplicate-requests": 6, + "auth-malformed-requests": 7, + "auth-invalid-requests": 8, + "auth-dropped-requests": 9, + "auth-unknown-types": 10, + "accounting-requests": 11, + "accounting-responses": 12, + "acct-duplicate-requests": 13, + "acct-malformed-requests": 14, + "acct-invalid-requests": 15, + "acct-dropped-requests": 16, + "acct-unknown-types": 17, + "proxy-access-requests": 18, + "proxy-access-accepts": 19, + "proxy-access-rejects": 20, + "proxy-access-challenges": 21, + "proxy-auth-responses": 22, + "proxy-auth-duplicate-requests": 23, + "proxy-auth-malformed-requests": 24, + "proxy-auth-invalid-requests": 25, + "proxy-auth-dropped-requests": 26, + "proxy-auth-unknown-types": 27, + "proxy-accounting-requests": 28, + "proxy-accounting-responses": 29, + "proxy-acct-duplicate-requests": 30, + "proxy-acct-malformed-requests": 31, + "proxy-acct-invalid-requests": 32, + "proxy-acct-dropped-requests": 33, + "proxy-acct-unknown-types": 34, + } + collected := freeRADIUS.Collect() + + assert.Equal(t, expected, collected) + ensureCollectedHasAllChartsDimsVarsIDs(t, freeRADIUS, collected) +} + +func TestFreeRADIUS_Collect_ReturnsNilIfClientStatusReturnsError(t *testing.T) { + freeRADIUS := New() + freeRADIUS.client = newErrorMockClient() + + assert.Nil(t, freeRADIUS.Collect()) +} + +func TestFreeRADIUS_Cleanup(t *testing.T) { + New().Cleanup() +} + +func ensureCollectedHasAllChartsDimsVarsIDs(t *testing.T, f *FreeRADIUS, collected map[string]int64) { + for _, chart := range *f.Charts() { + for _, dim := range chart.Dims { + _, ok := collected[dim.ID] + assert.Truef(t, ok, "collected metrics has no data for dim '%s' chart '%s'", dim.ID, chart.ID) + } + for _, v := range chart.Vars { + _, ok := collected[v.ID] + assert.Truef(t, ok, "collected metrics has no data for var '%s' chart '%s'", v.ID, chart.ID) + } + } +} + +func newOKMockClient() *mockClient { + return &mockClient{} +} + +func newErrorMockClient() *mockClient { + return &mockClient{errOnStatus: true} +} + +type mockClient struct { + errOnStatus bool +} + +func (m mockClient) Status() (*api.Status, error) { + if m.errOnStatus { + return nil, errors.New("mock Status error") + } + + status := &api.Status{ + AccessRequests: 1, + AccessAccepts: 2, + AccessRejects: 3, + AccessChallenges: 4, + AuthResponses: 5, + AuthDuplicateRequests: 6, + AuthMalformedRequests: 7, + AuthInvalidRequests: 8, + AuthDroppedRequests: 9, + AuthUnknownTypes: 10, + AccountingRequests: 11, + AccountingResponses: 12, + AcctDuplicateRequests: 13, + AcctMalformedRequests: 14, + AcctInvalidRequests: 15, + AcctDroppedRequests: 16, + AcctUnknownTypes: 17, + ProxyAccessRequests: 18, + ProxyAccessAccepts: 19, + ProxyAccessRejects: 20, + ProxyAccessChallenges: 21, + ProxyAuthResponses: 22, + ProxyAuthDuplicateRequests: 23, + ProxyAuthMalformedRequests: 24, + ProxyAuthInvalidRequests: 25, + ProxyAuthDroppedRequests: 26, + ProxyAuthUnknownTypes: 27, + ProxyAccountingRequests: 28, + ProxyAccountingResponses: 29, + ProxyAcctDuplicateRequests: 30, + ProxyAcctMalformedRequests: 31, + ProxyAcctInvalidRequests: 32, + ProxyAcctDroppedRequests: 33, + ProxyAcctUnknownTypes: 34, + } + return status, nil +} diff --git a/src/go/collectors/go.d.plugin/modules/freeradius/init.go b/src/go/collectors/go.d.plugin/modules/freeradius/init.go new file mode 100644 index 000000000..9c14da0ea --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/freeradius/init.go @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +package freeradius + +import ( + "errors" +) + +func (f *FreeRADIUS) validateConfig() error { + if f.Address == "" { + return errors.New("address not set") + } + if f.Port == 0 { + return errors.New("port not set") + } + if f.Secret == "" { + return errors.New("secret not set") + } + return nil +} diff --git a/src/go/collectors/go.d.plugin/modules/freeradius/integrations/freeradius.md b/src/go/collectors/go.d.plugin/modules/freeradius/integrations/freeradius.md new file mode 100644 index 000000000..9f23792f3 --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/freeradius/integrations/freeradius.md @@ -0,0 +1,199 @@ +<!--startmeta +custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/go/collectors/go.d.plugin/modules/freeradius/README.md" +meta_yaml: "https://github.com/netdata/netdata/edit/master/src/go/collectors/go.d.plugin/modules/freeradius/metadata.yaml" +sidebar_label: "FreeRADIUS" +learn_status: "Published" +learn_rel_path: "Collecting Metrics/Authentication and Authorization" +most_popular: False +message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE" +endmeta--> + +# FreeRADIUS + + +<img src="https://netdata.cloud/img/freeradius.svg" width="150"/> + + +Plugin: go.d.plugin +Module: freeradius + +<img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" /> + +## Overview + +This collector monitors FreeRADIUS servers. + +It collect metrics by sending [status-server](https://wiki.freeradius.org/config/Status) messages to the server. + + + + +This collector is supported on all platforms. + +This collector supports collecting metrics from multiple instances of this integration, including remote instances. + + +### Default Behavior + +#### Auto-Detection + +It automatically detects FreeRadius instances running on localhost. + + +#### Limits + +The default configuration for this integration does not impose any limits on data collection. + +#### Performance Impact + +The default configuration for this integration is not expected to impose a significant performance impact on the system. + + +## Metrics + +Metrics grouped by *scope*. + +The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels. + + + +### Per FreeRADIUS instance + +These metrics refer to the entire monitored application. + +This scope has no labels. + +Metrics: + +| Metric | Dimensions | Unit | +|:------|:----------|:----| +| freeradius.authentication | requests, responses | packets/s | +| freeradius.authentication_access_responses | accepts, rejects, challenges | packets/s | +| freeradius.bad_authentication | dropped, duplicate, invalid, malformed, unknown-types | packets/s | +| freeradius.proxy_authentication | requests, responses | packets/s | +| freeradius.proxy_authentication_access_responses | accepts, rejects, challenges | packets/s | +| freeradius.proxy_bad_authentication | dropped, duplicate, invalid, malformed, unknown-types | packets/s | +| freeradius.accounting | requests, responses | packets/s | +| freeradius.bad_accounting | dropped, duplicate, invalid, malformed, unknown-types | packets/s | +| freeradius.proxy_accounting | requests, responses | packets/s | +| freeradius.proxy_bad_accounting | dropped, duplicate, invalid, malformed, unknown-types | packets/s | + + + +## Alerts + +There are no alerts configured by default for this integration. + + +## Setup + +### Prerequisites + +#### Enable status server + +To enable status server, follow the [official documentation](https://wiki.freeradius.org/config/Status). + + + +### Configuration + +#### File + +The configuration file name for this integration is `go.d/freeradius.conf`. + + +You can edit the configuration file using the `edit-config` script from the +Netdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory). + +```bash +cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata +sudo ./edit-config go.d/freeradius.conf +``` +#### Options + +The following options can be defined globally: update_every, autodetection_retry. + + +<details open><summary>Config options</summary> + +| Name | Description | Default | Required | +|:----|:-----------|:-------|:--------:| +| update_every | Data collection frequency. | 1 | no | +| autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no | +| address | Server address. | 127.0.0.1 | yes | +| port | Server port. | 18121 | no | +| secret | FreeRADIUS secret. | adminsecret | no | + +</details> + +#### Examples + +##### Basic + +A basic example configuration. + +<details open><summary>Config</summary> + +```yaml +jobs: + - name: local + address: 127.0.0.1 + port: 18121 + secert: adminsecret + +``` +</details> + +##### Multi-instance + +> **Note**: When you define multiple jobs, their names must be unique. + +Collecting metrics from local and remote instances. + + +<details open><summary>Config</summary> + +```yaml +jobs: + - name: local + address: 127.0.0.1 + port: 18121 + secert: adminsecret + + - name: remote + address: 192.0.2.1 + port: 18121 + secert: adminsecret + +``` +</details> + + + +## Troubleshooting + +### Debug Mode + +To troubleshoot issues with the `freeradius` collector, run the `go.d.plugin` with the debug option enabled. The output +should give you clues as to why the collector isn't working. + +- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on + your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`. + + ```bash + cd /usr/libexec/netdata/plugins.d/ + ``` + +- Switch to the `netdata` user. + + ```bash + sudo -u netdata -s + ``` + +- Run the `go.d.plugin` to debug the collector: + + ```bash + ./go.d.plugin -d -m freeradius + ``` + + diff --git a/src/go/collectors/go.d.plugin/modules/freeradius/metadata.yaml b/src/go/collectors/go.d.plugin/modules/freeradius/metadata.yaml new file mode 100644 index 000000000..5ecdcf417 --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/freeradius/metadata.yaml @@ -0,0 +1,206 @@ +plugin_name: go.d.plugin +modules: + - meta: + id: collector-go.d.plugin-freeradius + plugin_name: go.d.plugin + module_name: freeradius + monitored_instance: + name: FreeRADIUS + link: https://freeradius.org/ + categories: + - data-collection.authentication-and-authorization + icon_filename: freeradius.svg + keywords: + - freeradius + - radius + most_popular: false + info_provided_to_referring_integrations: + description: "" + related_resources: + integrations: + list: [] + overview: + data_collection: + metrics_description: | + This collector monitors FreeRADIUS servers. + + It collect metrics by sending [status-server](https://wiki.freeradius.org/config/Status) messages to the server. + method_description: "" + default_behavior: + auto_detection: + description: | + It automatically detects FreeRadius instances running on localhost. + limits: + description: "" + performance_impact: + description: "" + additional_permissions: + description: "" + multi_instance: true + supported_platforms: + include: [] + exclude: [] + setup: + prerequisites: + list: + - title: Enable status server + description: | + To enable status server, follow the [official documentation](https://wiki.freeradius.org/config/Status). + configuration: + file: + name: go.d/freeradius.conf + options: + description: | + The following options can be defined globally: update_every, autodetection_retry. + folding: + title: Config options + enabled: true + list: + - name: update_every + description: Data collection frequency. + default_value: 1 + required: false + - name: autodetection_retry + description: Recheck interval in seconds. Zero means no recheck will be scheduled. + default_value: 0 + required: false + - name: address + description: Server address. + default_value: 127.0.0.1 + required: true + - name: port + description: Server port. + default_value: 18121 + required: false + - name: secret + description: FreeRADIUS secret. + default_value: adminsecret + required: false + examples: + folding: + title: Config + enabled: true + list: + - name: Basic + description: A basic example configuration. + config: | + jobs: + - name: local + address: 127.0.0.1 + port: 18121 + secert: adminsecret + - name: Multi-instance + description: | + > **Note**: When you define multiple jobs, their names must be unique. + + Collecting metrics from local and remote instances. + config: | + jobs: + - name: local + address: 127.0.0.1 + port: 18121 + secert: adminsecret + + - name: remote + address: 192.0.2.1 + port: 18121 + secert: adminsecret + troubleshooting: + problems: + list: [] + alerts: [] + metrics: + folding: + title: Metrics + enabled: false + description: "" + availability: [] + scopes: + - name: global + description: These metrics refer to the entire monitored application. + labels: [] + metrics: + - name: freeradius.authentication + description: Authentication + unit: packets/s + chart_type: line + dimensions: + - name: requests + - name: responses + - name: freeradius.authentication_access_responses + description: Authentication Responses + unit: packets/s + chart_type: line + dimensions: + - name: accepts + - name: rejects + - name: challenges + - name: freeradius.bad_authentication + description: Bad Authentication Requests + unit: packets/s + chart_type: line + dimensions: + - name: dropped + - name: duplicate + - name: invalid + - name: malformed + - name: unknown-types + - name: freeradius.proxy_authentication + description: Authentication + unit: packets/s + chart_type: line + dimensions: + - name: requests + - name: responses + - name: freeradius.proxy_authentication_access_responses + description: Authentication Responses + unit: packets/s + chart_type: line + dimensions: + - name: accepts + - name: rejects + - name: challenges + - name: freeradius.proxy_bad_authentication + description: Bad Authentication Requests + unit: packets/s + chart_type: line + dimensions: + - name: dropped + - name: duplicate + - name: invalid + - name: malformed + - name: unknown-types + - name: freeradius.accounting + description: Accounting + unit: packets/s + chart_type: line + dimensions: + - name: requests + - name: responses + - name: freeradius.bad_accounting + description: Bad Accounting Requests + unit: packets/s + chart_type: line + dimensions: + - name: dropped + - name: duplicate + - name: invalid + - name: malformed + - name: unknown-types + - name: freeradius.proxy_accounting + description: Accounting + unit: packets/s + chart_type: line + dimensions: + - name: requests + - name: responses + - name: freeradius.proxy_bad_accounting + description: Bad Accounting Requests + unit: packets/s + chart_type: line + dimensions: + - name: dropped + - name: duplicate + - name: invalid + - name: malformed + - name: unknown-types diff --git a/src/go/collectors/go.d.plugin/modules/freeradius/testdata/config.json b/src/go/collectors/go.d.plugin/modules/freeradius/testdata/config.json new file mode 100644 index 000000000..5a1939b60 --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/freeradius/testdata/config.json @@ -0,0 +1,7 @@ +{ + "update_every": 123, + "address": "ok", + "port": 123, + "secret": "ok", + "timeout": 123.123 +} diff --git a/src/go/collectors/go.d.plugin/modules/freeradius/testdata/config.yaml b/src/go/collectors/go.d.plugin/modules/freeradius/testdata/config.yaml new file mode 100644 index 000000000..4a3d1f8cd --- /dev/null +++ b/src/go/collectors/go.d.plugin/modules/freeradius/testdata/config.yaml @@ -0,0 +1,5 @@ +update_every: 123 +address: "ok" +port: 123 +secret: "ok" +timeout: 123.123 |