Skip to content

Commit

Permalink
Fixed the problem with the panic error
Browse files Browse the repository at this point in the history
  • Loading branch information
kochetovd committed Mar 5, 2024
1 parent 5a9da9a commit 09bf0ff
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 25 deletions.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

const (
ReleemAgentVersion = "1.13.0"
ReleemAgentVersion = "1.13.0.1"
)

type Config struct {
Expand Down
2 changes: 1 addition & 1 deletion current_version_agent
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.13.0
1.13.0.1
3 changes: 0 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,5 @@ require (
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
golang.org/x/crypto v0.16.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
)
6 changes: 0 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,12 @@ github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+F
github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY=
github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw=
github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY=
golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
Expand Down
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/bash
# install.sh - Version 1.13.0
# install.sh - Version 1.13.0.1
# (C) Releem, Inc 2022
# All rights reserved

# Releem installation script: install and set up the Releem Agent on supported Linux distributions
# using the package manager.

set -e
install_script_version=1.13.0
install_script_version=1.13.0.1
logfile="releem-install.log"

WORKDIR="/opt/releem"
Expand Down
21 changes: 11 additions & 10 deletions metrics/os.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,23 +148,24 @@ func (OS *OSMetricsGatherer) GetMetrics(metrics *Metrics) error {
Usage, err := disk.Usage(part.Mountpoint)
if err != nil {
OS.logger.Error(err)
} else {
UsageArray = append(UsageArray, StructToMap(Usage.String()))
}
UsageArray = append(UsageArray, StructToMap(Usage.String()))
PartitionsArray = append(PartitionsArray, StructToMap(part.String()))
PartName := part.Device[strings.LastIndex(part.Device, "/")+1:]
IOCounters, err := disk.IOCounters(PartName)
if err != nil {
OS.logger.Error(err)
} else {
if _, exists := PartitionCheck[part.Device]; !exists {

readCount = readCount + IOCounters[PartName].ReadCount
writeCount = writeCount + IOCounters[PartName].WriteCount
PartitionCheck[part.Device] = 1
}
OS.logger.Debug("IOCounters ", IOCounters)
IOCountersArray = append(IOCountersArray, MetricGroupValue{PartName: StructToMap(IOCounters[PartName].String())})
}
if _, exists := PartitionCheck[part.Device]; !exists {

readCount = readCount + IOCounters[PartName].ReadCount
writeCount = writeCount + IOCounters[PartName].WriteCount
PartitionCheck[part.Device] = 1
}
OS.logger.Debug("IOCounters ", IOCounters)
IOCountersArray = append(IOCountersArray, MetricGroupValue{PartName: StructToMap(IOCounters[PartName].String())})

}
OS.logger.Debug("PartitionCheck ", PartitionCheck)
info["Partitions"] = PartitionsArray
Expand Down
4 changes: 2 additions & 2 deletions mysqlconfigurer.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# mysqlconfigurer.sh - Version 1.13.0
# mysqlconfigurer.sh - Version 1.13.0.1
# (C) Releem, Inc 2022
# All rights reserved

Expand All @@ -12,7 +12,7 @@ MYSQLTUNER_REPORT=$MYSQLCONFIGURER_PATH"mysqltunerreport.json"
RELEEM_MYSQL_VERSION=$MYSQLCONFIGURER_PATH"mysql_version"
MYSQLCONFIGURER_CONFIGFILE="${MYSQLCONFIGURER_PATH}${MYSQLCONFIGURER_FILE_NAME}"
MYSQL_MEMORY_LIMIT=0
VERSION="1.13.0"
VERSION="1.13.0.1"
RELEEM_INSTALL_PATH=$MYSQLCONFIGURER_PATH"install.sh"
logfile="releem-mysqlconfigurer.log"

Expand Down

0 comments on commit 09bf0ff

Please sign in to comment.