forked from pioro/oracle-db-appdev-monitoring
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.0 release --------- Signed-off-by: Mark Nelson <[email protected]>
- Loading branch information
1 parent
ae0a119
commit f44c3ee
Showing
62 changed files
with
4,824 additions
and
14,244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
oraclelinux | ||
alpline | ||
.* | ||
tests | ||
*-example.toml | ||
.golangci.yml | ||
*.md | ||
*.pc | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
# Check for updates to GitHub Actions every weekday | ||
interval: "daily" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,7 @@ dist/ | |
.idea | ||
*.apk | ||
*.pub | ||
*.key | ||
oci8.pc | ||
*.skip | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
run: | ||
# timeout for analysis, e.g. 30s, 5m, default is 1m | ||
deadline: 2m | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
# Default enabled | ||
- deadcode | ||
- errcheck | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- staticcheck | ||
- structcheck | ||
- typecheck | ||
- unused | ||
- varcheck | ||
|
||
# Ours | ||
- gocritic | ||
- gofumpt | ||
- goimports | ||
- lll | ||
- misspell | ||
- stylecheck | ||
- unconvert | ||
- unparam | ||
- gocyclo | ||
- gocognit | ||
- dupl | ||
- errorlint | ||
- bodyclose | ||
- exhaustive | ||
- exhaustivestruct | ||
- gochecknoinits | ||
- goconst | ||
- godox | ||
- importas | ||
- nestif | ||
- nolintlint | ||
- predeclared | ||
- testpackage | ||
# - wrapcheck (consider adding) | ||
fast: false | ||
|
||
linters-settings: | ||
errcheck: | ||
# report about not checking of errors in type assertions: `a := b.(MyStruct)`; | ||
check-type-assertions: false | ||
|
||
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; | ||
check-blank: true | ||
|
||
# path to a file containing a list of functions to exclude from checking | ||
# see https://github.com/kisielk/errcheck#excluding-functions for details | ||
exclude: .github/config/lint/errcheck.exclude.txt | ||
govet: | ||
# report about shadowed variables | ||
check-shadowing: true | ||
gofumpt: | ||
# Choose whether or not to use the extra rules that are disabled by default | ||
extra-rules: true | ||
goimports: | ||
maligned: | ||
# print struct with more effective memory layout or not, false by default | ||
suggest-new: true | ||
misspell: | ||
# Correct spellings using locale preferences for US or UK. | ||
# Default is to use a neutral variety of English. | ||
# Setting locale to US will correct the British spelling of 'colour' to 'color'. | ||
locale: US | ||
ignore-words: | ||
- cancelled | ||
lll: | ||
# max line length, lines longer will be reported. Default is 120. | ||
# '\t' is counted as 1 character by default, and can be changed with the tab-width option | ||
line-length: 160 | ||
# tab width in spaces. Default to 1. | ||
tab-width: 1 | ||
unused: | ||
# treat code as a program (not a library) and report unused exported identifiers; default is false. | ||
# XXX: if you enable this setting, unused will report a lot of false-positives in text editors: | ||
# if it's called for subdir of a project it can't find funcs usages. All text editor integrations | ||
# with golangci-lint call it on a directory with the changed file. | ||
check-exported: false | ||
unparam: | ||
gocritic: | ||
enabled-checks: | ||
- appendCombine | ||
- argOrder | ||
- assignOp | ||
- badCond | ||
- boolExprSimplify | ||
- builtinShadow | ||
- captLocal | ||
- caseOrder | ||
- codegenComment | ||
- commentedOutCode | ||
- commentedOutImport | ||
- defaultCaseOrder | ||
- deprecatedComment | ||
- docStub | ||
- dupArg | ||
- dupBranchBody | ||
- dupCase | ||
- dupSubExpr | ||
- elseif | ||
- emptyFallthrough | ||
- equalFold | ||
- flagDeref | ||
- flagName | ||
- hexLiteral | ||
- indexAlloc | ||
- initClause | ||
- methodExprCall | ||
- nilValReturn | ||
- octalLiteral | ||
- offBy1 | ||
- rangeExprCopy | ||
- regexpMust | ||
- sloppyLen | ||
- stringXbytes | ||
- switchTrue | ||
- typeAssertChain | ||
- typeSwitchVar | ||
- typeUnparen | ||
- underef | ||
- unlambda | ||
- unslice | ||
- valSwap | ||
- weakCond | ||
|
||
# Unused | ||
# - unnecessaryBlock | ||
# - yodaStyleExpr | ||
# - appendAssign | ||
# - commentFormatting | ||
# - emptyStringTest | ||
# - exitAfterDefer | ||
# - ifElseChain | ||
# - hugeParam | ||
# - importShadow | ||
# - nestingReduce | ||
# - paramTypeCombine | ||
# - ptrToRefParam | ||
# - rangeValCopy | ||
# - singleCaseSwitch | ||
# - sloppyReassign | ||
# - unlabelStmt | ||
# - unnamedResult | ||
# - wrapperFunc | ||
staticcheck: | ||
# Select the Go version to target. The default is '1.13'. | ||
go: "1.19" | ||
stylecheck: | ||
# Select the Go version to target. The default is '1.13'. | ||
go: "1.19" | ||
godox: | ||
# report any comments starting with keywords, this is useful for TODO or FIXME comments that | ||
# might be left in the code accidentally and should be resolved before merging | ||
keywords: | ||
- TODO | ||
- HACK | ||
- FIX | ||
- FIXME | ||
- TEMP | ||
- TMP | ||
nolintlint: | ||
# Disable to ensure that nolint directives don't have a leading space. Default is true. | ||
allow-leading-space: false | ||
# Exclude following linters from requiring an explanation. Default is []. | ||
allow-no-explanation: [errcheck] | ||
# Enable to require an explanation of nonzero length after each nolint directive. Default is false. | ||
require-explanation: true | ||
# Enable to require nolint directives to mention the specific linter being suppressed. Default is false. | ||
require-specific: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
ARG BASE_IMAGE | ||
FROM ${BASE_IMAGE} AS build | ||
|
||
RUN microdnf install golang-1.19.10 | ||
|
||
WORKDIR /go/src/oracledb_exporter | ||
COPY . . | ||
RUN go get -d -v | ||
|
||
ARG VERSION | ||
ENV VERSION ${VERSION:-1.0.0} | ||
|
||
RUN GOOS=linux GOARCH=amd64 go build -v -ldflags "-X main.Version=${VERSION} -s -w" | ||
|
||
FROM ${BASE_IMAGE} as exporter | ||
LABEL org.opencontainers.image.authors="Oracle America, Inc." | ||
LABEL org.opencontainers.image.description="Oracle Database Observability Exporter" | ||
|
||
ENV VERSION ${VERSION:-1.0.0} | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN microdnf install -y oracle-instantclient-release-el8 && microdnf install -y oracle-instantclient-basic | ||
|
||
ENV LD_LIBRARY_PATH /usr/lib/oracle/21/client64/lib | ||
ENV PATH $PATH:/usr/lib/oracle/21/client64/bin | ||
ENV ORACLE_HOME /usr/lib/oracle/21/client64 | ||
|
||
COPY --from=build /go/src/oracledb_exporter/oracle-db-appdev-monitoring /oracledb_exporter | ||
ADD ./default-metrics.toml /default-metrics.toml | ||
|
||
EXPOSE 9161 | ||
|
||
USER 1000 | ||
|
||
ENTRYPOINT ["/oracledb_exporter"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,58 @@ | ||
Copyright (c) 2021 Oracle and/or its affiliates. | ||
|
||
The Universal Permissive License (UPL), Version 1.0 | ||
|
||
Subject to the condition set forth below, permission is hereby granted to any | ||
person obtaining a copy of this software, associated documentation and/or data | ||
(collectively the "Software"), free of charge and under any and all copyright | ||
rights in the Software, and any and all patent rights owned or freely | ||
licensable by each licensor hereunder covering either (i) the unmodified | ||
Software as contributed to or provided by such licensor, or (ii) the Larger | ||
Works (as defined below), to deal in both | ||
|
||
(a) the Software, and | ||
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if | ||
one is included with the Software (each a "Larger Work" to which the Software | ||
is contributed by such licensors), | ||
|
||
without restriction, including without limitation the rights to copy, create | ||
derivative works of, display, perform, and distribute the Software and make, | ||
use, sell, offer for sale, import, export, have made, and have sold the | ||
Software and the Larger Work(s), and to sublicense the foregoing rights on | ||
either these or other terms. | ||
|
||
This license is subject to the following condition: | ||
The above copyright notice and either this complete permission notice or at | ||
a minimum a reference to the UPL must be included in all copies or | ||
substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2016 Seth Miller <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is furnished | ||
to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
-- | ||
|
||
Copyright (c) 2021, 2023, Oracle and/or its affiliates. | ||
|
||
The Universal Permissive License (UPL), Version 1.0 | ||
|
||
Subject to the condition set forth below, permission is hereby granted to any | ||
person obtaining a copy of this software, associated documentation and/or data | ||
(collectively the "Software"), free of charge and under any and all copyright | ||
rights in the Software, and any and all patent rights owned or freely | ||
licensable by each licensor hereunder covering either (i) the unmodified | ||
Software as contributed to or provided by such licensor, or (ii) the Larger | ||
Works (as defined below), to deal in both | ||
|
||
(a) the Software, and | ||
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if | ||
one is included with the Software (each a "Larger Work" to which the Software | ||
is contributed by such licensors), | ||
|
||
without restriction, including without limitation the rights to copy, create | ||
derivative works of, display, perform, and distribute the Software and make, | ||
use, sell, offer for sale, import, export, have made, and have sold the | ||
Software and the Larger Work(s), and to sublicense the foregoing rights on | ||
either these or other terms. | ||
|
||
This license is subject to the following condition: | ||
The above copyright notice and either this complete permission notice or at | ||
a minimum a reference to the UPL must be included in all copies or | ||
substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.